博客 > 术业专攻> 云计算> docker> docker学习笔记–docker搭建官方版私有仓库(了解) 2019年08月29日 11:25:17
docker run -d --name registry -v /opt/registry:/var/lib/registry -p 5000:5000 --restart=always registry
vim /etc/docker/daemon.json { "insecure-registries": ["192.168.106.5:5000"] } systemctl restart docker
[root@localhost ~]$docker tag docker.io/ruibaby/halo 192.168.106.5:5000/halo [root@localhost ~]$docker push 192.168.106.5:5000/halo The push refers to a repository [192.168.106.5:5000/halo] 235396e2e49d: Pushed e3da0e1554b0: Pushed 5b2393b02905: Pushed 3344e993faf9: Pushed f146389833a6: Pushed bc291d65c8e7: Pushed 8b47d19735d5: Pushed e9805f9bdc9e: Pushed 9c147c576d67: Pushed 685f72a7cd4f: Pushed 097524d80f54: Pushed 1191b3f5862a: Pushed 08a01612ffca: Pushed 8bb25f9cdc41: Pushed f715ed19c28b: Pushed latest: digest: sha256:b14708cdecd988f1da7a6a6c988d58cc4bbf4359e1772901e103c3e42b77ba35 size: 3467
[root@localhost ~]$curl -XGET http://192.168.106.5:5000/v2/_catalog {"repositories":["halo"]}
也可以在浏览器当中进行查看:
先配置连接。
vim /etc/docker/daemon.json { "insecure-registries": ["192.168.106.5:5000"] } systemctl restart docker
然后测试一下拉镜像。
[root@localhost ~]$docker pull 192.168.106.5:5000/halo Using default tag: latest Trying to pull repository 192.168.106.5:5000/halo ... latest: Pulling from 192.168.106.5:5000/halo bc9ab73e5b14: Pull complete 193a6306c92a: Pull complete e5c3f8c317dc: Pull complete a587a86c9dcb: Pull complete a4c7ee7ef122: Pull complete a7c0dad691e9: Pull complete 367a6a68b113: Pull complete 28351dec2f89: Pull complete bfa52db486a3: Pull complete 486c2b19fa61: Pull complete 4347d45f20ca: Pull complete 5f40f4dee7fa: Pull complete b4fb2907506a: Pull complete 4ce77557a36f: Pull complete 3f42e1292556: Pull complete Digest: sha256:b14708cdecd988f1da7a6a6c988d58cc4bbf4359e1772901e103c3e42b77ba35 Status: Downloaded newer image for 192.168.106.5:5000/halo:latest [root@localhost ~]$docker images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.106.5:5000/halo latest f1bf61fa7d73 8 days ago 721 MB
© 2018 www.qingketang.net 鄂ICP备18027844号-1
武汉快勤科技有限公司 13554402156 武汉市东湖新技术开发区关山二路特一号国际企业中心6幢4层7号
扫码关注,全站教程免费播放
订单金额:
支付金额:
支付方式: