docker 镜像 上传到docker hub
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker 镜像 上传到docker hub相关的知识,希望对你有一定的参考价值。
需要按照如下步骤处理:
我一直没有第三步,一直没有成功,直到尝试了一次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>
[[email protected] 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 [[email protected] centos6]# docker tag f6bb69ea7020 516249940/centos6-ssh:v1 [[email protected] 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
[[email protected] 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 [[email protected] centos6]#
登录我的docker hub看看查看仓库
本文出自 “天地冰寂” 博客,请务必保留此出处http://yanconggod.blog.51cto.com/1351649/1880051
以上是关于docker 镜像 上传到docker hub的主要内容,如果未能解决你的问题,请参考以下文章