The push refers to a repository(docker报错解决方案)
·
报错
The push refers to a repository [192.168.1.161:5000/hello-world]
Get https://192.168.1.161:5000/v1/_ping: http: server gave HTTP response to HTTPS client
原因
docker私有仓库服务器,默认是基于https传输的,所以我们需要在客户端127.0.0.1做相关设置,不使用https传输
解决步骤
[root@localhost ~]# vi /etc/docker/daemon.json
将下面的代码放进去保存并退出。
"insecure-registries":["127.0.0.1:5000"]
最终如下所示:
{ "registry-mirrors": ["https://njrds9qc.mirror.aliyuncs.com"], "insecure-registries":["127.0.0.1:5000"] }
依次执行下面两条命令,重新启动docker:
[root@localhost ~]# systemctl daemon-reload [root@localhost ~]# systemctl restart docker
更多推荐
已为社区贡献1条内容
所有评论(0)