解决docker拉取镜像时报错Error response from daemon: Get ““: http: server gave HTTP response to HTTPS client

场景:新搭建一台服务器,需要拉取公司私有镜像仓库。

例如镜像仓库地址:192.168.1.111:5000

docker拉取私有仓库报如下错误:

Error response from daemon: Get "http://192.168.1.111:5000/v2/": http: server gave HTTP response to HTTPS client

解决方式:

1.编辑docker中的daemon.json文件,没有就创建

vim /etc/docker daemon.json

 2.在文件中添加如下内容

{
  "insecure-registries": ["192.168.1.111:5000"]
}

3. 重新加载daemon

systemctl daemon-reload

 4.重启docker

systemctl restart docker

你可能感兴趣的:(http,网络协议,网络)