往dockerhub上上传镜像

往dockerhub上上传镜像

一、首先注册一个账号

https://hub.docker.com/

然后点击Create->Create Repository
输入自己的账号名,然后在设置仓库名
如用户名:wangzhenwei , 仓库名:its

二、然后给本地镜像打标签:

[root@helloword tomcat7+jdk8]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
its-image-base      1.0                 a4c75a448942        3 minutes ago       762MB

打标签:

[root@helloword tomcat7+jdk8]# docker tag its-image-base:1.0 wangzhenwei/its-image-base:v1.0
[root@helloword tomcat7+jdk8]# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
its-image-base               1.0                 a4c75a448942        3 minutes ago       762MB
wangzhenwei/its-image-base   v1.0                a4c75a448942        3 minutes ago       762MB

三、登陆docker

[root@helloword tomcat7+jdk8]# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: wangzhenwei
Password:
Login Succeeded

四、上传镜像

docker push wangzhenwei/its-image-base:v1.0

五、登陆搜索

https://hub.docker.com/r/wangzhenwei/its-image-base/

为什么要把基础镜像上传?
如果应用docker化之后,会有一个问题非常麻烦,就是镜像仓库问题。
会发现应用升级部署,所有的时间,都压在带宽上。
关于如何制作私库、如何提高镜像下载的效率,可以看后面的文章。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容