在MacOS里安装Docker,版本:
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: darwin/amd64
Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: true
在VirtualBox上安装CoreOS(CentOS也一样)并运行Docker Registry
。在其中自测OK:
$ curl http://172.17.8.101:5000/v2/_catalog
{"repositories":[]}
172.17.8.101
是CoreOS的IP。
在本地做新tag:
$ docker tag ubuntu 172.17.8.101:5000/myfirstimage
向CoreOS推送:
$ docker push 172.17.8.101:5000/myfirstimage
有下面的错误:
The push refers to a repository [172.17.8.101:5000/myfirstimage]
Get https://172.17.8.101:5000/v2/: dial tcp 172.17.8.101:5000: getsockopt: no route to host
可以从本地ping到CentOS,但为什么不能推送?