docker tag和docker push的使用詳解
docker tag 詳解
docker tag 命令的使用,以及如何將本地的鏡像推送到daocloud.io,這里不用docker hub作實(shí)驗(yàn),是因?yàn)椋琩ocker hub網(wǎng)速不給力,容易推送失敗。
使用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,如果沒有賬戶的,需要去網(wǎng)站上注冊一個(gè)。
chenyangdeMacBook-Pro:~ chenyang$ docker login daocloud.io Username (chenyang_1010): chenyang_1010 Password: Login Succeeded chenyangdeMacBook-Pro:~ chenyang$
打上標(biāo)簽,然后上傳
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
上傳結(jié)果
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
使用Docker部署MySQL 5.7&8.0主從集群的方法步驟
這篇文章主要介紹了使用Docker部署MySQL 5.7&8.0主從集群的方法步驟,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-03-03在Docker容器中部署Django的時(shí)區(qū)問題
本文主要介紹了在Docker容器中部署Django的時(shí)區(qū)問題,文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-10-10詳解如何修改 Docker 默認(rèn)網(wǎng)橋地址
這篇文章主要介紹了詳解如何修改 Docker 默認(rèn)網(wǎng)橋地址,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-05-05Centos7 安裝部署Kubernetes(k8s)集群實(shí)現(xiàn)過程
這篇文章主要為大家介紹了Centos7 安裝部署Kubernetes(k8s)集群實(shí)現(xiàn)過程詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-11-11docker 容器添加指定網(wǎng)絡(luò)地址的方法實(shí)現(xiàn)
Docker容器運(yùn)行的時(shí)候默認(rèn)會(huì)自動(dòng)分配一個(gè)默認(rèn)網(wǎng)橋所在網(wǎng)段的IP地址,本文主要介紹了docker容器添加指定網(wǎng)絡(luò)地址的方法實(shí)現(xiàn),具有一定的參考價(jià)值,感興趣的可以了解一下2024-01-01