Insecure Registry(不需要验证的仓库)

命令行执行:

docker run -d -p 5000:5000 --restart=always --name registry \
  -v /home/mamaci/registry:/var/lib/registry \
  registry:2.4.0

其他机器拉取报错:
Error response from daemon: Get https://xxx.xxx.xxx.xxx:5000/v1/_ping: tls: oversized record received with length 20527

解决方法:
vi /etc/default/docker
添加:DOCKER_OPTS="--insecure-registry ip:5000"
主和其他机器都需要加!

参考:
http://www.open-open.com/lib/view/open1456539405281.html
https://github.com/docker/distribution/blob/master/docs/insecure.md

最后添加上daocloud的加速器,修改为:
DOCKER_OPTS="--insecure-registry ip:5000 --registry-mirror=http://b8b310cb.m.daocloud.io"