使用mac推送到私人码头注册表

Mac Os

Sierra 10.12.5 

在Mac上的Docker

 Client: Version: 17.06.0-ce API version: 1.30 Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:31:53 2017 OS/Arch: darwin/amd64 Server: Version: 17.06.0-ce API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:51:55 2017 OS/Arch: linux/amd64 Experimental: true 

注册处

 CentOS Linux release 7.3.1611 (Core) Client: Version: 17.06.0-ce API version: 1.30 Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:20:36 2017 OS/Arch: linux/amd64 Server: Version: 17.06.0-ce API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:21:56 2017 OS/Arch: linux/amd64 Experimental: false 

所以我使用证书设置了一个安全的注册表…

 https://my-registry:5000/v2/_catalog 

回报

 {"repositories":[]} 

但是,当我尝试通过苹果机,我得到…

 docker push docker-registry-dev-0:5000/impact-twilio-proxy The push refers to a repository [my-registry:5000/xxxxxx] Get https://my-registry:5000/v2/: dial tcp xxx.xxx.xxx.27:5000: getsockopt: no route to host 

我在哪里可以将注册表的自签名证书放在Mac客户端上? 但是,这似乎并不像证书错误…

我用来运行注册表的命令…

 sudo docker run -d -p 5000:5000 -v $(pwd)/registry-certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/my-registry.cert -e REGISTRY_HTTP_TLS_KEY=/certs/my-registry.key --restart=always --name registry registry:2 

没有路由到主机是因为我的Mac码头桥网络与我的作品VPN网络冲突。 只是迫使桥到另​​一个网络工作…

看到这里: https : //github.com/moby/moby/issues/25645