【发布时间】:2022-11-14 04:29:51
【问题描述】:
我部署了一个有 6 个节点的 docker swarm。我构建了一些图像,并尝试将它们作为服务添加到群中。我有 5 个微服务。当我使用 docker-compose 在一台主机上运行时,一切正常。我运行此命令 docker service create rate --with-registry-auth 并收到以下消息。
image rate:latest could not be accessed on a registry to record
its digest. Each node will access rate:latest independently,
possibly leading to different nodes running different
versions of the image.
yyf9m49xw3enwano1scr55ufc
overall progress: 0 out of 1 tasks
1/1: No such image: rate:latest
我运行 docker images 并出现了速率图像。 rate 是存储库名称。我也尝试使用图像 ID,但没有奏效。我可以添加到 swarm 的唯一图像是公开的图像。
【问题讨论】:
-
没有看到minimal reproducible example,说更多有点棘手;你能edit这个问题包含足够的源代码来演示这个问题,还是这不是一个编程问题?我在 Kubernetes 中的经验比 Swarm 多一点,但我可以告诉你,在尝试通过集群编排器运行它们之前,基本上需要将图像推送到注册表中。
标签: docker dockerfile docker-swarm docker-registry