解决Error response from daemon: Get https://: http: server gave HTTP response to HTTPS client

背景:在一台服务器上,拉取私有镜像仓库中的镜像报错;

            镜像仓库地址:192.168.1.26:5000

报错信息如下:

ErrImagePull: rpc error: code = Unknown desc = Error response from daemon: Get https://192.168.1.26: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.26:5000"]
}

3. 重新加载daemon:

systemctl daemon-reload

4. 重启docker:

systemctl restart docker

你可能感兴趣的:(运维相关,docker)