docker swarm 1.1.3:从公共仓库中提取并试图标记

时间:2016-04-03 13:39:19

标签: docker docker-registry docker-machine

在我的Mac上工作,全新安装的Docker Toolbox。重现的步骤:

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 info现在显示健康节点:

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工作,私人注册表也可以,因为我可以登录并推送它。

1 个答案:

答案 0 :(得分:0)

在我问这个问题30分钟后,我找到了PR on github,它确认并解决了这个问题。它被标记为swarm 1.2.0。