首页 > Docker > Docker 第七章(将镜像推送到Docker Hub)
2015
12-21

Docker 第七章(将镜像推送到Docker Hub)

镜像构建完成之后,我们就可以将它上传到Docker Hub上面去,这样其他人就能使用这个镜像了。

一、将镜像推送到Docker Hub上

1.1、查看本地有哪些镜像

[root@localhost Tshare365_web]# docker images
REPOSITORY                       TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
<none>                           <none>              302ea2008b6c        About an hour ago   1.097 GB
<none>                           <none>              33a66c3c04f5        About an hour ago   536.7 MB
<none>                           <none>              808be8503aae        3 hours ago         294.7 MB
tshare365/tshare365_web          latest              7d5c4154c46f        27 hours ago        208.5 MB
<none>                           <none>              494ff684c21a        27 hours ago        208.5 MB
<none>                           <none>              6acf359d8074        27 hours ago        208.5 MB
<none>                           <none>              0426a581ff70        30 hours ago        208.5 MB
<none>                           <none>              e2c3697dedaf        30 hours ago        208.5 MB
<none>                           <none>              bc56ef3a8186        30 hours ago        208.5 MB
<none>                           <none>              e292d21c5f3b        31 hours ago        208.5 MB
<none>                           <none>              7229fa312967        31 hours ago        208.5 MB
<none>                           <none>              94a8b67460f8        2 days ago          208.5 MB
<none>                           <none>              8375fcdf800b        2 days ago          208.5 MB
<none>                           <none>              d40a5a622f52        2 days ago          208.5 MB
tshare365/nginx                  latest              c0f193d06c58        2 days ago          187.9 MB
<none>                           <none>              744cbaefe0f7        2 days ago          187.9 MB
ubuntu                           14.04               d55e68e6cc9c        9 days ago          187.9 MB
ubuntu                           latest              d55e68e6cc9c        9 days ago          187.9 MB
ubuntu                           12.04               bad926a6fb50        9 days ago          136.9 MB
nginx                            latest              6ffc02088cb8        10 days ago         133.8 MB
doumadou/centos6.5_x86_64-base   latest              5bcd27f3a345        5 months ago        429.8 MB

1.2、选择推送的镜像

[root@localhost Tshare365_web]# docker push tshare365/tshare365_web tshare365/tshare365
docker: "push" requires 1 argument.
See 'docker push --help'.

Usage: docker push [OPTIONS] NAME[:TAG]

Push an image or a repository to the registry
[root@localhost Tshare365_web]# docker push tshare365/tshare365_web 
The push refers to a repository [tshare365/tshare365_web] (len: 1)
7d5c4154c46f: Image already exists 
69e88523dbee: Image successfully pushed 
bf413860a740: Image successfully pushed 
dbf024451d71: Image successfully pushed 
8b27147ab111: Image successfully pushed 
f381009adccf: Image successfully pushed 
87fef334e7fc: Image successfully pushed 
87fef334e7fc: Buffering to Disk 
b207c06aba70: Image successfully pushed 
a82f81f25750: Image successfully pushed 
9377ad319b00: Image successfully pushed 
Digest: sha256:2d36733bd2a1d553255789995537187d891385ea71abb0132fb46a8b953ebba1
[root@localhost Tshare365_web]#

1.3、登录Docker Hub 查看上传成功的镜像

blob.png

总结

 本章docker内容就到此结束了,如果你对docker感兴趣,请持续关注Tshare365谢谢!




最后编辑:
作者:tshare365
这个作者貌似有点懒,什么都没有留下。
捐 赠您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请狠狠点击

留下一个回复