资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

dockertag和dockerpush如何使用

这篇文章主要介绍“docker tag和docker push如何使用”,在日常操作中,相信很多人在docker tag和docker push如何使用问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”docker tag和docker push如何使用”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

在宁海等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供网站制作、成都网站制作 网站设计制作按需网站制作,公司网站建设,企业网站建设,品牌网站设计,网络营销推广,外贸营销网站建设,宁海网站建设费用合理。

docker tag 详解

docker tag 命令的使用,以及如何将本地的镜像推送到daocloud.io,这里不用docker hub作实验,是因为,docker hub网速不给力,容易推送失败。

使用docker tag使用镜像id重命名

chenyangdemacbook-pro:~ chenyang$ docker images
repository     tag         image id      created       size
hello-world     latest       fce289e99eb9    9 weeks ago     1.84 kb
chenyangdemacbook-pro:~ chenyang$
chenyangdemacbook-pro:~ chenyang$ docker images
repository     tag         image id      created       size
hello-world     latest       fce289e99eb9    9 weeks ago     1.84 kb
chenyangdemacbook-pro:~ chenyang$ docker tag fce289e99 hello-world:v1
chenyangdemacbook-pro:~ chenyang$ docker images
repository     tag         image id      created       size
hello-world     latest       fce289e99eb9    9 weeks ago     1.84 kb
hello-world     v1         fce289e99eb9    9 weeks ago     1.84 kb

使用docker tag使用镜像tag重命名

chenyangdemacbook-pro:~ chenyang$ docker images
repository     tag         image id      created       size
hello-world     latest       fce289e99eb9    9 weeks ago     1.84 kb
hello-world     v1         fce289e99eb9    9 weeks ago     1.84 kb
chenyangdemacbook-pro:~ chenyang$ docker tag hello-world:latest hello-world:v2
chenyangdemacbook-pro:~ chenyang$ docker images
repository     tag         image id      created       size
hello-world     latest       fce289e99eb9    9 weeks ago     1.84 kb
hello-world     v1         fce289e99eb9    9 weeks ago     1.84 kb
hello-world     v2         fce289e99eb9    9 weeks ago     1.84 kb

使用docker push 推送镜像到daocloud.io

需要登陆daocloud.io,如果没有账户的,需要去网站上注册一个。

chenyangdemacbook-pro:~ chenyang$ docker login daocloud.io
username (chenyang_1010): chenyang_1010
password: 
login succeeded
chenyangdemacbook-pro:~ chenyang$

打上标签,然后上传

chenyangdemacbook-pro:~ chenyang$ docker tag hello-world daocloud.io/zter/hello-world:v1
chenyangdemacbook-pro:~ chenyang$ docker images
repository           tag         image id      created       size
hello-world          latest       fce289e99eb9    9 weeks ago     1.84 kb
hello-world          v1         fce289e99eb9    9 weeks ago     1.84 kb
hello-world          v2         fce289e99eb9    9 weeks ago     1.84 kb
daocloud.io/zter/hello-world  v1         fce289e99eb9    9 weeks ago     1.84 kb
chenyangdemacbook-pro:~ chenyang$ docker push daocloud.io/zter/hello-world:v1
the push refers to a repository [daocloud.io/zter/hello-world]
af0b15c8625b: pushed 
v1: digest: sha256:39bbd4a41b5d3b164632d3b4a295c0db31139992a8fe985f949dac7ccff7aa54 size: 524

上传结果

docker tag和docker push如何使用

到此,关于“docker tag和docker push如何使用”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!


当前文章:dockertag和dockerpush如何使用
浏览路径:http://cdkjz.cn/article/gsdphi.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220