[root@docker network-scripts]# docker pull alpine
Using default tag: latest #默認(rèn)最新版本,可指定版本如:docker pull alpine:3.10.3
latest: Pulling from library/alpine
e6b0cf9c0882: Pull complete
Digest: sha256:2171658620155679240babee0a7714f6509fae66898db422ad803b951257db78
Status: Downloaded newer image for alpine:latest
docker.io/library/alpine:latest #鏡像的構(gòu)
備注:docker pull alpine 可改成 docker.io/library/apline:latest
[root@docker network-scripts]# docker images #查看本地鏡像
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine latest cc0abc535e36 12 days ago 5.59MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
[root@docker network-scripts]# docker tag cc0abc535e36 docker.io/zhoumingkang/alpine:v3.10.3
# cc0abc535e36:鏡像IMAGE ID
#docker.io/zhoumingkang/alpine:v3.10.3:鏡像的結(jié)構(gòu)
[root@docker network-scripts]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine latest cc0abc535e36 12 days ago 5.59MB
zhoumingkang/alpine v3.10.3 cc0abc535e36 12 days ago 5.59MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
[root@docker network-scripts]# docker push docker.io/zhoumingkang/alpine:v3.10.3
The push refers to repository [docker.io/zhoumingkang/alpine]
6b27de954cca: Mounted from library/alpine
v3.10.3: digest: sha256:3983cc12fb9dc20a009340149e382a18de6a8261b0ac0e8f5fcdf11f8dd5937e size: 528
[root@docker network-scripts]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zhoumingkang/alpine v3.10.3 cc0abc535e36 12 days ago 5.59MB
alpine latest cc0abc535e36 12 days ago 5.59MB
alpine 3.9.4 055936d39205 8 months ago 5.53MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
[root@docker network-scripts]# docker rmi docker.io/library/alpine:latest
Untagged: alpine:latest #移除標(biāo)簽
Untagged: alpine@sha256:2171658620155679240babee0a7714f6509fae66898db422ad803b951257db78
[root@docker network-scripts]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zhoumingkang/alpine v3.10.3 cc0abc535e36 12 days ago 5.59MB
alpine 3.9.4 055936d39205 8 months ago 5.53MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
[root@docker network-scripts]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zhoumingkang/alpine v3.10.3 cc0abc535e36 12 days ago 5.59MB
alpine 3.9.4 055936d39205 8 months ago 5.53MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
[root@docker network-scripts]# docker rmi -f cc0abc535e36
Untagged: zhoumingkang/alpine:v3.10.3
Untagged: zhoumingkang/alpine@sha256:3983cc12fb9dc20a009340149e382a18de6a8261b0ac0e8f5fcdf11f8dd5937e
Deleted: sha256:cc0abc535e36a7ede71978ba2bbd8159b8a5420b91f2fbc520cdf5f673640a34
Deleted: sha256:6b27de954cca6332272e7709b7d8ceccee1489d9452af73391df360a26123580
[root@docker network-scripts]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine 3.9.4 055936d39205 8 months ago 5.53MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
[root@docker network-scripts]# docker pull docker.io/zhoumingkang/alpine:v3.10.3
v3.10.3: Pulling from zhoumingkang/alpine
e6b0cf9c0882: Pull complete
Digest: sha256:3983cc12fb9dc20a009340149e382a18de6a8261b0ac0e8f5fcdf11f8dd5937e
Status: Downloaded newer image for zhoumingkang/alpine:v3.10.3
docker.io/zhoumingkang/alpine:v3.10.3
[root@docker network-scripts]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
zhoumingkang/alpine v3.10.3 cc0abc535e36 12 days ago 5.59MB
alpine 3.9.4 055936d39205 8 months ago 5.53MB
hello-world latest fce289e99eb9 12 months ago 1.84kB
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。