折腾了两个小时,终于好了

https://github.com/docker/distribution/issues/1874   这是github docker 的相关问题

需要 push  到私有仓库端的操作  ,就是需要上传的那台服务器

vim /etc/docker/daemon.json

1: 配置 

{
  "insecure-registries":["公网ip(别把22端口加上了):5000"]
}

2:重启 docker  

systemctl restart  docker

私有仓库端  服务端那台   

docker ps 

3:先查看是否启动状态, 并且看  ports  是不是  5000端口 映射  容器 5000 

docker 私有仓库The push refers to repository [x:5000/test] Get https://x:5000/v2/: dial tcp x:5000: conn

4:推送端     docker  push     image     (前提:把镜像名  改为  server端 ip + 端口 + 镜像名  例如 )

docker tag centos 120.0.0.0:8080/testcentos

docker push centos 120.0.0.0:8080/testcentos

 docker 私有仓库The push refers to repository [x:5000/test] Get https://x:5000/v2/: dial tcp x:5000: conn

成功了,最重要的是第一步配置别配置错了! 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-10-10
  • 2021-09-06
  • 2021-06-02
  • 2021-05-25
猜你喜欢
  • 2021-07-02
  • 2022-01-16
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-10-31
相关资源
相似解决方案