docker swarm 1.1.3:从 public 仓库拉取并尝试标记后没有这样的图像

docker swarm 1.1.3: No such image after pulling from public repo, and trying to tag

使用我的 Mac,全新安装的 Docker 工具箱。重现步骤:

docker-machine create -d virtualbox --virtualbox-memory 700 --swarm --swarm-master --swarm-discovery consul://192.168.11.10:8500 swarm-master
docker-machine create -d virtualbox --virtualbox-memory 700 --swarm --swarm-discovery consul://192.168.11.10:8500 node-1

顺利完成

eval $(docker-machine env --swarm swarm-master)

docker 信息现在显示健康节点:

Containers: 3
 Running: 3
 Paused: 0
 Stopped: 0
Images: 4
Server Version: swarm/1.1.3
Role: primary
Strategy: spread
Filters: health, port, dependency, affinity, constraint
Nodes: 2
 node-1: 192.168.99.110:2376
  └ Status: Healthy
  └ Containers: 1
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 709.9 MiB
  └ Labels: executiondriver=native-0.2, kernelversion=4.1.19-boot2docker, operatingsystem=Boot2Docker 1.10.3 (TCL 6.4.1); master : 625117e - Thu Mar 10 22:09:02 UTC 2016, provider=virtualbox, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-04-03T13:29:22Z
 swarm-master: 192.168.99.109:2376
  └ Status: Healthy
  └ Containers: 2
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 709.9 MiB
  └ Labels: executiondriver=native-0.2, kernelversion=4.1.19-boot2docker, operatingsystem=Boot2Docker 1.10.3 (TCL 6.4.1); master : 625117e - Thu Mar 10 22:09:02 UTC 2016, provider=virtualbox, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-04-03T13:29:35Z
Plugins:
 Volume:
 Network:
Kernel Version: 4.1.19-boot2docker
Operating System: linux
Architecture: amd64
CPUs: 2
Total Memory: 1.386 GiB
Name: swarm-master


docker pull ubuntu
Using default tag: latest
node-1: Pulling ubuntu:latest... : downloaded
swarm-master: Pulling ubuntu:latest... : downloaded

docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              latest              97434d46f197        2 weeks ago         188 MB
swarm               latest              291cbe419fe6        4 weeks ago         18.11 MB

现在标记以准备上传到私有注册表:

docker tag 97434d46f197 git.xxxx.com:5000/user/ubuntu
Error response from daemon: No such image: 97434d46f197

如果我现在切换到:

eval $(docker-machine env swarm-master)

标记有效,我可以推送到私有注册表:

docker tag 97434d46f197 git.xxxx.com:5000/user/ubuntu
docker push git.xxxx.com:5000/user/ubuntu

为什么 docker swarm 无法识别图像? 注意:consul 有效,私有注册表也有效,因为我可以登录并推送到它。

在我提出这个问题 30 分钟后,我发现了一个 PR on github,它确认并修复了这个问题。它被标记为 swarm 1.2.0.