用Docker Registry 建立私有镜像库

1 环境

2 步骤

3 FAQ

4 参考

环境

ubuntu-16.04-desktop-amd64.iso

步骤

具体可参考博文,在我的环境实施成功,在此借花献佛了:http://www.cnblogs.com/lienhua34/p/4922130.html

FAQ

上面的博文唯一对push失败的解决方案,在我的环境里不生效,

错误提示如下:

root@slave2:/etc/default# sudo docker push 192.168.80.130:5000/hello-world
The push refers to a repository [192.168.80.130:5000/hello-world]
Get https://192.168.80.130:5000/v1/_ping: http: server gave HTTP response to HTTPS client

我用另一种方式解决的,步骤如下:

root@slave2:/etc/docker# echo '{ "insecure-registries":["192.168.80.130:5000"] }' > /etc/docker/daemon.json

root@slave2:/etc/docker# systemctl restart docker

执行上述两个命令后,重试docker push 成功:

root@slave2:/etc/docker# docker push 192.168.80.130:5000/hello-world
The push refers to a repository [192.168.80.130:5000/hello-world]
a02596fdd012: Pushed
latest: digest: sha256:f18d040ea7bf47c7ea8f7ff1a8682811cf37551c747158e37b9c75f5450e6fac size: 2097

参考

http://www.111cn.net/sys/linux/118539.htm

转载于:https://www.cnblogs.com/mongolhu/p/6158486.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值