与私人dockerregistry问题进行远程通信
我已经build立了如下的registry服务器:
docker run -d --name p_registry -e SETTINGS_FLAVOUR=local -e STORAGE_PATH=/reg_storage -v /data/private-registry/storage:/reg_storage -p 5000:5000 registry
所以,现在我可以使用本地推送到此registry
docker push localhost:5000/hello:tag1
但是,当我试图从另一台机器,到这个registry,它保释:
docker push 1.2.3.4:5000/hello:tag1 Error: Invalid registry endpoint https://1.2.3.4:5000/v1/: Get https://1.2.3.4:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 1.2.3.4:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/1.2.3.4:5000/ca.crt
现在,之后我尝试了其他各种select:
Edit /etc/sysconfig/docker other_args=--insecure-registry=1.2.3.4:5000
然后使用“服务docker重启”重新启动docker。 这也没有工作。 每次我试图推,它给了我无效的registry端点。
我甚至尝试做如下:
vi /etc/default/docker DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=1.2.3.4:5000"
即使是上面的那个也给出了终点错误。
有人可以帮忙吗?
参考: 远程访问私人dockerregistry
DOCKER_OPTS="--insecure-registry 1.2.3.4:5000"
应该工作
sudo service docker stop sudo docker -d --insecure-registry 1.2.3.4:5000
这对我有效。 请尝试一下,让我们知道。