$ docker pull registry:2.5.0
2.5.0: Pulling from library/registry
e110a4a17941: Pull complete
2ee5ed28ffa7: Pull complete
d1562c23a8aa: Pull complete
06ba8e23299f: Pull complete
802d2a9c64e8: Pull complete
Digest: sha256:1b68f0d54837c356e353efb04472bc0c9a60ae1c8178c9ce076b01d2930bcc5d
Status: Downloaded newer image for registry:2.5.0
$ docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
registry 2.5.0 sha256:1b68f0d54837c356e353efb04472bc0c9a60ae1c8178c9ce076b01d2930bcc5d c6c14b3960bd 3 years ago 33.3MB
接着,我们把这个镜像重新打一个tag
$ docker tag registry:2.5.0 10.142.232.151:8021/library/registry:2.5.0
$ docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
10.142.232.151:8021/library/registry 2.5.0 <none> c6c14b3960bd 3 years ago 33.3MB
registry 2.5.0 sha256:1b68f0d54837c356e353efb04472bc0c9a60ae1c8178c9ce076b01d2930bcc5d c6c14b3960bd 3 years ago 33.3MB
$ docker images --digests
docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
10.142.232.151:8021/library/registry 2.5.0 sha256:bf0b4fc3833f908017d650af94071d62a12390020b30658dd623b98b80af81ed c6c14b3960bd 3 years ago 33.3MB
registry 2.5.0 sha256:1b68f0d54837c356e353efb04472bc0c9a60ae1c8178c9ce076b01d2930bcc5d c6c14b3960bd 3 years ago 33.3MB
[root@amd] $ docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
centos 7 sha256:4a701376d03f6b39b8c2a8f4a8e499441b0d567f9ab9d58e4991de4472fb813c 5e35e350aded 6 weeks ago 203MB
[root@arm] $ docker images --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
centos 7 sha256:4a701376d03f6b39b8c2a8f4a8e499441b0d567f9ab9d58e4991de4472fb813c 4dfd99be812b 6 weeks ago 273MB