拉取docker镜像报错:Error response from daemon: Get "https://10.1.24.16:5000/v2/": http: server gave HTTP response to HTTPS client
报错
C:\Users\liji>docker pull 10.1.24.16:5000/send2 Using default tag: latest Error response from daemon: Get "https://10.1.24.16:5000/v2/": http: server gave HTTP response to HTTPS client
解决方法:
Windows
修改 C:\Users\用户名\.docker\daemon.json
{ "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } }, "experimental": false, "features": { "buildkit": true }, "insecure-registries": [ "10.1.24.16:5000" ], "registry-mirrors": [ "https://docker.mirrors.ustc.edu.cn/", "https://registry.docker-cn.com", "http://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn", "https://reg-mirror.qiniu.com", "https://dockerhub.azk8s.cn", "https://mirror.ccs.tencentyun.com" ] }
或者是
Linux
修改 /etc/docker/daemon.json,在insecure-registries加入ip和端口
{ "registry-mirrors":["https://docker.mirrors.ustc.edu.cn"], "insecure-registries":[ "10.253.151.11:8008", "10.1.24.16:5000" ] }
接着重启Linux服务
systemctl restart docker
报错原因:
在向私有镜像push 镜像时,docker从1.3之后,与docker registry交互默认使用的是https,此处只是http服务;
docker registry未采用https服务,而客户端docker使用https请求push所致