首页 > 其他 > 详细

镜像仓库

时间:2020-05-22 13:48:47      阅读:56      评论:0      收藏:0      [点我收藏+]

1、上传镜像到公有仓库

1)、登录https://hub.docker.com/ 创建账号

2)、docker images

找一个小一点的images,如hello-world

 技术分享图片

 

 3)、打上tag

docker tag hello-world:latest  larry003/hello-world:latest

larry003 是docker hub上的用户名

4)登录docker hub

docker login

 

5)将镜像上传

docker push larry003/hello-world:latest

技术分享图片

 

2、私有仓库

1)打开 https://hub.docker.com, 搜索registry

 2) 下载registry版本2 
   docker pull registry:2
3) 运行镜像
  docker run -d -p 5000:5000 registry:2

4) 打上tag

docker tag hello-world:latest localhost:5000/hello-world:latest

5) 推送镜像

docker push localhost:5000/hello-world:latest

总结:这样私有仓库就创建起来了。

缺点:生产环境的单点问题,如果这条服务器故障了,其它服务器很难接管过来。

           没有操作界面。

 

镜像仓库

原文:https://www.cnblogs.com/linlf03/p/12936365.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!