使用 dockerpool 作为镜像源 pull mongo 镜像出现错误,如下:

[root@localhost Downloads]# docker pull dl.dockerpool.com:5000/mongo
Using default tag: latest
Trying to pull repository dl.dockerpool.com:5000/mongo ... failed
unable to ping registry endpoint https://dl.dockerpool.com:5000/v0/
v2 ping attempt failed with error: Get https://dl.dockerpool.com:5000/v2/: tls: oversized record received with length 28012
 v1 ping attempt failed with error: Get https://dl.dockerpool.com:5000/v1/_ping: tls: oversized record received with length 28012

系统信息

解决方法

修改/etc/sysconfig/docker文件,将其中的:OPTIONS='--selinux-enabled' 修改为:

OPTIONS='--selinux-enabled --insecure-registry dl.dockerpool.com:5000'

重启docker服务并重新下载

[root@localhost Downloads]# service restart docker.service
[root@localhost Downloads]# docker pull dl.dockerpool.com:5000/mongo
docker pull dl.dockerpool.com:5000/mongo
Using default tag: latest
838563738ca0: Pulling dependent layers 
511136ea3c5a: Download complete 
638fd9704285: Download complete 
61f7f4f722fb: Download complete 
5e147951a272: Download complete 
71e05e4679c7: Download complete 
39f6b53ad8c7: Download complete 
17eb812d0f1e: Download complete 
cf233efd80d8: Download complete