我有一个码头形象,我想推送到我的注册表(托管在localhost)。我知道:
docker push localhost:5000/my_image而且正常工作。但是,如果我标记该图像并按:
docker push 172.20.20.20:5000/my_image我犯了个错误。
The push refers to a repository [172.20.20.20:5000/my_tomcat] (len: 1)unable to ping registry endpoint https://172.20.20.20:5000/v0/ v2ping attempt failed with error:Get https://172.20.20.20:5000/v2/: Gateway Time-out
我不能用IP来指注册表吗?如果是这样的话,我如何从另一个主机推送它不是localhost的映像?
编辑
我用这种方式运行注册表:
docker run -d -p 5000:5000 --restart=always --name registry registry:2发布于 2016-02-10 12:15:16
正如"所有事情的IPs“( 杰斯·弗雷泽尔)中所提到的那样,您应该能够使用端口1.10使用固定的IP地址运行注册表。
它使用码头运行的选择。
# create a new bridge network with your subnet and gateway for your ip block
$ docker network create --subnet 203.0.113.0/24 --gateway 203.0.113.254 iptastic
# run a nginx container with a specific ip in that block
$ docker run --rm -it --net iptastic --ip 203.0.113.2 nginx
# curl the ip from any other place (assuming this is a public ip block duh)
$ curl 203.0.113.2可以将此示例调整为注册表停靠程序运行参数。
发布于 2016-02-22 14:41:36
首先,请检查您是否能够连接端口5000上的注册表。在Linux/windows中,您可以使用telnet来完成这一任务。下面是命令。
$ telnet 172.20.20.20 5000
如果连接检查失败,请检查防火墙设置。
我不确定您是否正在运行具有登录功能的运行注册表。但从这个问题上我可以假设你没有使用它。在这种情况下,请将您的注册表作为一个不安全的注册表添加到您试图访问注册表的停靠守护进程中。这个过程在这里描述- https://docs.docker.com/registry/insecure/。
如果成功,请告诉我。
https://stackoverflow.com/questions/35314092
复制相似问题