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

 

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

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 

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

docker tag centos 120.0.0.0:8080/testcentos

docker push centos 120.0.0.0:8080/testcentos

 

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

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值