Docker

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

Posted on 2020-10-11,1 min read

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

docker pull 10.213.120.68/library/dhcc-zuul-gate:1
Error response from daemon: Get https://10.213.120.68/v2/: http: server gave HTTP response to HTTPS client

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

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

然后重启docker

sudo systemctl restart docker 
sudo restart docker 

下一篇: 用Docker搭建Shadowsocks服务器→