docker 自建Registry時 無法push

docker 自建Registry後,將images檔push出去時會出現下以的錯誤:
root@docker:~# docker push 172.17.42.1:5000/httpd-dowdot
Error response from daemon: invalid registry endpoint https://172.17.42.1:5000/v0/: unable to ping registry endpoint https://172.17.42.1:5000/v0/
v2 ping attempt failed with error: Get https://172.17.42.1:5000/v2/: EOF
v1 ping attempt failed with error: Get https://172.17.42.1:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add --insecure-registry 172.17.42.1: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/172.17.42.1:5000/ca.crt

解法:
在/etc/default/docker加入以下參數,再把docker服務重啟就可以了
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=172.17.42.1:5000"

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *