我已将注册表服务器设置如下:
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
所以,现在我可以使用本地推送到这个注册表
docker push localhost:5000/hello:tag1
但是当我试图将它从另一台机器推送到这个注册表时,它会退出:
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
现在,在那之后我尝试了其他各种选择:
Edit /etc/sysconfig/docker
other_args=--insecure-registry=1.2.3.4:5000
然后使用“service docker restart”重新启动 docker。这也不起作用。每次我尝试推送时,它都会给我无效的注册表端点。
我什至尝试这样做:
vi /etc/default/docker
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=1.2.3.4:5000"
即使是上面的那个也给出了端点错误。
有人可以帮忙吗?