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

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

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 :

  1. version: '3.9'
  2. services:
  3. telikos-activityplanworkflow-service:
  4. container_name: telikos-activityplanworkflow-service
  5. build:
  6. context: .
  7. dockerfile: Dockerfile
  8. depends_on:
  9. ##----Dependent images-----------
  10. broker:
  11. condition: service_healthy
  12. mongo:
  13. condition: service_started
  14. ##---Ports-------------
  15. ports:
  16. - 8080:8080
  17. expose:
  18. - 8080
  19. ##---Environment variables------------
  20. environment:
  21. - server.port=8080
  22. - kafkabootstrapservers=broker:9092
  23. ##-----------------------------------------
  24. #----docker-images------------------------------------------------------
  25. zookeeper:
  26. image: confluentinc/cp-zookeeper:6.2.0
  27. hostname: zookeeper
  28. container_name: zookeeperap
  29. ports:
  30. - "2181:2181"
  31. environment:
  32. ZOOKEEPER_CLIENT_PORT: 2181
  33. ZOOKEEPER_TICK_TIME: 2000
  34. broker:
  35. image: confluentinc/cp-server:6.2.0
  36. hostname: broker
  37. container_name: brokerap
  38. depends_on:
  39. - zookeeper
  40. ports:
  41. - "29092:29092"
  42. - "9101:9101"
  43. environment:
  44. KAFKA_BROKER_ID: 1
  45. ALLOW_PLAINTEXT_LISTENER: "yes"
  46. KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
  47. KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
  48. KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_HOST://localhost:29092
  49. KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
  50. KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
  51. KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
  52. KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
  53. KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
  54. KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
  55. KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
  56. KAFKA_JMX_PORT: 9101
  57. KAFKA_JMX_HOSTNAME: localhost
  58. KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: http://schema-registry:8081
  59. CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: broker:9092
  60. CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
  61. CONFLUENT_METRICS_ENABLE: 'true'
  62. CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
  63. healthcheck:
  64. test: nc -z localhost 29092 || exit -1
  65. start_period: 25s
  66. interval: 10s
  67. timeout: 10s
  68. retries: 10
  69. mongo:
  70. container_name: mongoap
  71. image: mongo
  72. ports:
  73. - 27017:27017
  74. environment:
  75. MONGO_INITDB_ROOT_USERNAME: admin
  76. MONGO_INITDB_ROOT_PASSWORD: password
  77. healthcheck:
  78. test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
  79. start_period: 40s
  80. interval: 15s
  81. timeout: 10s
  82. retries: 5
  83. mongo-express:
  84. image: mongo-express
  85. restart: always
  86. ports:
  87. - 8081:8081
  88. environment:
  89. ME_CONFIG_MONGODB_ADMINUSERNAME: admin
  90. ME_CONFIG_MONGODB_ADMINPASSWORD: password
  91. ME_CONFIG_MONGODB_URL: mongodb://admin:password@mongo:27017/

DockerFile :

  1. FROM bellsoft/liberica-openjdk-alpine:17
  2. RUN apk add curl
  3. VOLUME /tmp
  4. WORKDIR /app
  5. COPY target/telikos-activityplanworkflow-service.jar /app/
  6. ADD --chown=15000:15000 'https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar' opentelemetry-javaagent.jar
  7. 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:

确定