当前位置:   article > 正文

The push refers to a repository(docker报错解决方案)_the push refers to repository

the push refers to repository

报错

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

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/211289
推荐阅读
相关标签
  

闽ICP备14008679号