Error response from daemon: lease “moby-image-sha256:c274..”:未找到

huangapple go评论58阅读模式
英文:

Error response from daemon: lease "moby-image-sha256:c274..": not found

问题

运行命令 docker-compose up -d 时出现以下错误:Error response from daemon: 找不到名称为 "moby-image-sha256:c2740b69f111bd711c867e337c12bab4b3d720c987e0d09549fe95e6badc6ba8" 的镜像。

我正在尝试在 Docker 中使用上面的 Docker 文件运行 Kafka 和 ZooKeeper,但我不知道这个错误的含义。

英文:

Ran the command docker-compose up -d
enter image description here
got this error : Error response from daemon: lease "moby-image-sha256:c2740b69f111bd711c867e337c12bab4b3d720c987e0d09549fe95e6badc6ba8": not found

No idea what this means. I am on a M1.This is my docker files :

version: '3.9'

services:
  telikos-activityplanworkflow-service:
    container_name: telikos-activityplanworkflow-service
    build:
      context: .
      dockerfile: Dockerfile
    depends_on:
      ##----Dependent images-----------
      broker:
        condition: service_healthy
      mongo:
        condition: service_started
    ##---Ports-------------
    ports:
      - 8080:8080
    expose:
      - 8080
    ##---Environment variables------------
    environment:
      - server.port=8080
      - kafkabootstrapservers=broker:9092
  ##-----------------------------------------
  #----docker-images------------------------------------------------------


  zookeeper:
    image: confluentinc/cp-zookeeper:6.2.0
    hostname: zookeeper
    container_name: zookeeperap
    ports:
      - "2181:2181"
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000

  broker:
    image: confluentinc/cp-server:6.2.0
    hostname: broker
    container_name: brokerap
    depends_on:
      - zookeeper
    ports:
      - "29092:29092"
      - "9101:9101"
    environment:
      KAFKA_BROKER_ID: 1
      ALLOW_PLAINTEXT_LISTENER: "yes"
      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_HOST://localhost:29092
      KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_JMX_PORT: 9101
      KAFKA_JMX_HOSTNAME: localhost
      KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: http://schema-registry:8081
      CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: broker:9092
      CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
      CONFLUENT_METRICS_ENABLE: 'true'
      CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
    healthcheck:
      test: nc -z localhost 29092 || exit -1
      start_period: 25s
      interval: 10s
      timeout: 10s
      retries: 10


  mongo:
    container_name: mongoap
    image: mongo
    ports:
      - 27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: password
    healthcheck:
      test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
      start_period: 40s
      interval: 15s
      timeout: 10s
      retries: 5

  mongo-express:
    image: mongo-express
    restart: always
    ports:
      - 8081:8081
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: admin
      ME_CONFIG_MONGODB_ADMINPASSWORD: password
      ME_CONFIG_MONGODB_URL: mongodb://admin:password@mongo:27017/

DockerFile :

FROM bellsoft/liberica-openjdk-alpine:17
RUN apk add curl
VOLUME /tmp
WORKDIR /app
COPY target/telikos-activityplanworkflow-service.jar /app/
ADD --chown=15000:15000 'https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar' opentelemetry-javaagent.jar
ENTRYPOINT ["java", "-javaagent:opentelemetry-javaagent.jar", "-jar", "telikos-activityplanworkflow-service.jar"]

I was trying to run kafka and zookeeper in docker using the docker file above. I have no idea what this means.

答案1

得分: 5

这个错误看起来可能与 Docker Desktop 中新增的 containerd 图像存储集成有关。

首先尝试按照 Docker 的文档 中的步骤切换对此功能的支持:

  1. 转到设置。
  2. 选择实验性功能选项卡。
  3. 在“使用 containerd 拉取和存储图像”旁边,选择复选框。

如果更改这些设置解决了您的问题,请随后查看 路线图问题 371,他们正在跟踪这个新功能的进展。

英文:

That error looks like it could be related to the new containerd image storage integration being added in Docker Desktop.

First attempt to toggle the support for this feature following the steps from docker's docs:

> 1. Navigate to Settings.
> 2. Select the Experimental features tab.
> 3. Next to Use containerd for pulling and storing images, select the checkbox.

If changing that solves your issue, then please follow up on the roadmap issue 371 where they are tracking the progress of this new feature.

答案2

得分: 0

一般来说,租赁是由客户端创建的containerd中的资源,用于引用其他资源,如快照和内容,如此链接所述。

要解决这个问题,您应该清理您的环境。因此,使用docker rm <container>命令删除您拥有的容器,使用docker rmi <image>命令删除镜像,然后从containerd的根目录/var/lib/container中删除租赁。

英文:

In general, leases are resources in containerd which are created by clients and are used to reference other resources such as snapshots and content, as stated in this link.

To solve the problem, you should cleanup your environment. So delete the containers you have with docker rm &lt;container&gt; commands, delete the images with docker rmi &lt;image&gt; and then remove the leases from containerd's root directory /var/lib/container.

huangapple
  • 本文由 发表于 2023年6月6日 17:03:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76413014.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定