docker 自建Registry時 無法push

本文介绍了解决docker自建私有Registry时遇到的无法推送镜像的问题。通过在配置文件中添加不安全注册表参数并重启docker服务,可以成功解决因HTTPS连接失败导致的错误。
             
 

docker 自建Registry時 無法push

http://history.dowdot.idv.tw/?p=2152

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″



查看原文:http://www.zoues.com/2016/10/25/docker-%e8%87%aa%e5%bb%baregistry%e6%99%82-%e7%84%a1%e6%b3%95push/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值