首页 > Web开发 > 详细

docker 镜像 上传到docker hub

时间:2016-12-06 23:23:35      阅读:586      评论:0      收藏:0      [点我收藏+]

需要按照如下步骤处理:

我一直没有第三步,一直没有成功,直到尝试了一次docker tag ,上传docker hub就没有出现问题了。

step1——找到本地镜像的ID:docker images

step2——登陆Hub:docker login --username=username --password=password --email=email

step3——tag:docker tag <imageID> <namespace>/<image name>:<version tag eg latest>

step4——push镜像docker push <namespace>/<image name>

[root@salt-master centos6]# docker images 
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
centos6-ssh                    latest              f6bb69ea7020        About an hour ago   556.4 MB
docker.io/jdeathe/centos-ssh   latest              f6aa254214ab        32 hours ago        214.7 MB
docker.io/centos               centos6             8315978ceaaa        4 weeks ago         194.6 MB
[root@salt-master centos6]# docker tag  f6bb69ea7020 516249940/centos6-ssh:v1
[root@salt-master centos6]# docker images 
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
516249940/centos6-ssh          v1                  f6bb69ea7020        About an hour ago   556.4 MB
centos6-ssh                    latest              f6bb69ea7020        About an hour ago   556.4 MB
docker.io/jdeathe/centos-ssh   latest              f6aa254214ab        32 hours ago        214.7 MB
docker.io/centos               centos6             8315978ceaaa        4 weeks ago         194.6 MB
[root@salt-master centos6]# docker push 516249940/centos6-ssh:v1
The push refers to a repository [docker.io/516249940/centos6-ssh]
e1e3a72d67ca: Layer already exists 
05da2767947a: Layer already exists 
ba149593d1ad: Layer already exists 
eed64a3d3cac: Layer already exists 
70a84a101c16: Layer already exists 
52dcf50b12eb: Pushed 
08204235bfac: Layer already exists 
6cbd0415f265: Pushed 
d73c31c5daa6: Layer already exists 
v1: digest: sha256:79b18121746c65f6c55f4cf424bc11f6cb3004e3e071f8083484945ff278d1b9 size: 2174
[root@salt-master centos6]#


登录我的docker hub看看查看仓库

技术分享

本文出自 “天地冰寂” 博客,请务必保留此出处http://yanconggod.blog.51cto.com/1351649/1880051

docker 镜像 上传到docker hub

原文:http://yanconggod.blog.51cto.com/1351649/1880051

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