1. 程式人生 > >docker push 遇到如下問題解決方法

docker push 遇到如下問題解決方法

FATA[0004] Error response from daemon: v1 ping attempt failed with error: Get https://10.8.8.127:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 10.8.8.127: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/10.8.8.127:5000/ca.crt 

解決方法:

修改docker的配置檔案/etc/default/docker,新增下面的內容,

    DOCKER_OPTS="--insecure-registry xxx.xxx.xxx.xxx:5000"

然後重啟docker後臺程序,

$ sudo service docker restart

就OK了。