docker上传镜像报错HTTP or HTTPS with an unknown CA certificate 解决方案

环境:

system:centos6.6

Docker version :1.7.1, build 786b29d/1.7.1

kernel:4.4.163-1.el6.elrepo.x86_64

上传镜像时报错信息如下:

[root@docker1 ~]# docker push 192.168.88.130:5000/centos
Error response from daemon: invalid registry endpoint https://192.168.88.130:5000/v0/: unable to ping registry endpoint https://192.168.88.130:5000/v0/
v2 ping attempt failed with error: Get https://192.168.88.130:5000/v2/: tls: oversized record received with length 20527
 v1 ping attempt failed with error: Get https://192.168.88.130:5000/v1/_ping: tls: oversized record received with length 20527. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.88.130: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/192.168.88.130:5000/ca.crt

 

解决方案1

在上传的系统用以下命令启动docker服务:

docker -d --insecure-registry ip:5000 &

解决方案2

修改/etc/sysconfig/docker 中的other_args,添加以下参数:

other_args='--insecure-registry 192.168.88.130:5000'

 

posted @ 2018-12-04 16:36  korons  阅读(758)  评论(0编辑  收藏  举报