我已經建立了如下注冊表服務器:有私人碼頭工人註冊表的遠程溝通問題
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
,然後使用「服務泊塢窗重啓」重新啓動泊塢窗。這也沒有用。每次嘗試推送時,都會給我提供無效的註冊表端點。
我甚至嘗試如下改進:
vi /etc/default/docker
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=1.2.3.4:5000"
即使是一個上面給出的終點誤差。
有人可以幫忙嗎?
編號:Remote access to a private docker-registry
我認爲你的答案可能是真的。我後來意識到的問題是網絡本身,我無法通過推送圖像的機器在1.2.3.4上遠程登錄到5000。我將在明天嘗試一些內容並提供更新。 – Jason 2015-02-11 07:03:53
這是原因,爲什麼它以前沒有工作。我在Docker註冊服務器上添加了DOCKER_OPTS,而不是deamon/client。如果我使用other_args = - insecure-registry = 1.2.3.4:5000更新/ etc/sysconfig/docker文件,它工作正常。 – Jason 2015-02-27 00:11:29