[root@k8syum-226 ~]# docker push 192.168.1.10:5000/k8s/pause-amd64:3.1
The push refers to repository [192.168.1.10:5000/k8s/pause-amd64]
Get https://192.168.1.10:5000/v2/: http: server gave HTTP response to HTTPS client
解决方法:
1.检查配置文件:
[root@k8syum-226 ~]# cat /etc/docker/daemon.json
{
"insecure-registries": ["192.168.1.10:5000"],
"max-concurrent-downloads": 20,
"max-concurrent-uploads": 10,
"debug": false,
"data-root": "/usr/local/docker",
"log-opts": {
"max-size": "100m",
"max-file": "5"
}
}
2.配置文件生效
systemctl daemon-reload
3.重启docker
systemctl restart docker
本文档介绍了如何处理尝试将Docker镜像推送到本地私有仓库时遇到的错误:`http: server gave HTTP response to HTTPS client`。错误发生的原因是客户端尝试以HTTPS方式连接到只接受HTTP的服务器。解决方法包括检查并更新`/etc/docker/daemon.json`配置文件,确保已将自建仓库添加到`insecure-registries`列表中,然后重新加载守护进程配置并重启Docker服务。

被折叠的 条评论
为什么被折叠?



