阅读

允许Docker使用无权限验证的Docker Registry

摘要: 配置insecure-registries,docker才能使用无权限验证的docker registry。

默认情况下,Docker不能使用没有配置权限验证的Docker Registry,会出现如下报错:

docker pull 192.168.59.100:5000/ubuntu
Error response from daemon: Get https://192.168.59.100:5000/v2/: http: server gave HTTP response to HTTPS client

这时需要修改docker配置文件,将”192.168.59.100:5000”添加到insecure-registries中:

vim /etc/docker/daemon.json
{ "insecure-registries" : ["192.168.59.100:5000"] }

然后重启docker

sudo systemctl restart docker // ubuntu 16.04
sudo restart docker // ubuntu 14.04

参考