先删除已经有的镜像
[root@DockServer opt]
REPOSITORY TAG IMAGE ID CREATED SIZE
127.0.0.1:5000
/nginx
v2 570d531c994a 4 hours ago 107MB
nginx v2 570d531c994a 4 hours ago 107MB
nginx latest b8efb18f159b 3 weeks ago 107MB
centos 6.8 0cd976dc0a98 11 months ago 195MB
registry 2.1.1 52bb991b482e 22 months ago 220MB
[root@DockServer opt]
Untagged: 127.0.0.1:5000
/nginx
:v2
Untagged: 127.0.0.1:5000
/nginx
@sha256:9586184eb142f8c66decfd4fd7b3a2b54abfcb0f0a25541e69ba3725c61ba8b3
Untagged: nginx:v2
Deleted: sha256:570d531c994a495b7cba536ac12f9d640141cbbaecd9ae8a114816681a8ca750
Deleted: sha256:f4a3f9102faadf3e941a05724ffe69e3aa3dc1fee5de3762c374ee337a27d60b
[root@DockServer opt]
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest b8efb18f159b 3 weeks ago 107MB
centos 6.8 0cd976dc0a98 11 months ago 195MB
registry 2.1.1 52bb991b482e 22 months ago 220MB
确定已经删除后,我们下载
[root@DockServer opt]
v2: Pulling from nginx
94ed0c431eb5: Already exists
9406c100a1c3: Already exists
aa74daafd50c: Already exists
79afb5d63c06: Pull complete
Digest: sha256:9586184eb142f8c66decfd4fd7b3a2b54abfcb0f0a25541e69ba3725c61ba8b3
Status: Downloaded newer image
for
127.0.0.1:5000
/nginx
:v2
[root@DockServer opt]
REPOSITORY TAG IMAGE ID CREATED SIZE
127.0.0.1:5000
/nginx
v2 d296335af0a9 4 hours ago 107MB
nginx latest b8efb18f159b 3 weeks ago 107MB
centos 6.8 0cd976dc0a98 11 months ago 195MB
registry 2.1.1 52bb991b482e 22 months ago 220MB