docker上传镜像至Registry时https报错解决方法
[root@vir-56 ~]# docker push 27.26.160.255:5000/test56/httpd:1.1.1报错如下:The push refers to a repository [27.26.160.255:5000/test56/httpd]Get https://27.26.160.255:5000/v1/_ping: http: server ga...
·
[root@vir-56 ~]# docker push 27.26.160.255:5000/test56/httpd:1.1.1
报错如下:
The push refers to a repository [27.26.160.255:5000/test56/httpd]
Get https://27.26.160.255:5000/v1/_ping: http: server gave HTTP response to HTTPS client
这是由于Registry为了安全性考虑,默认是需要https证书支持的.
但是我们可以通过一个简单的办法解决:
修改/etc/docker/daemon.json文件
#vi /etc/docker/daemon.json
{
"insecure-registries": ["<ip>:5000"]
}
#systemctl daemon-reload
#systemctl restart docker
注::Registry的机器ip地址,在安装registry的节点和客户端需要访问私有Registry的节点都需要执行此步操作。
更多推荐
已为社区贡献6条内容
所有评论(0)