Skip to content

Should images with different tags have different digests? #1811

@sergeyfd

Description

@sergeyfd

Hello,

How digests for manifests are generated? I tagged the same image with three different tags and pushed them into 2.4.1 registry. Two of then have identical digests while third one is different. Is it supposed behavior? I know that in the older versions of registry digests were different for all tags, but I am not sure at what version this behavior changed.

-bash-4.2$ curl http://localhost:5000/v2/dubros/test/tags/list
{"name":"dubros/test","tags":["latest","t1","t2"]}
-bash-4.2$ curl --header "Accept: application/vnd.docker.distribution.manifest.v2+json" -I -X HEAD localhost:5000/v2/dubros/test/manifests/latest 2>/dev/null | grep Docker-Content-Digest | awk '{print $2}'
sha256:0a88770e824e5b7bcd15eec6da32f22e6d4e84c1fef9a5cdc5bbafd8917f9c31
-bash-4.2$ curl --header "Accept: application/vnd.docker.distribution.manifest.v2+json" -I -X HEAD localhost:5000/v2/dubros/test/manifests/t1 2>/dev/null | grep Docker-Content-Digest | awk '{print $2}'
sha256:2e1a1a37978fae1d0fa6aff2aada9a512d5c811eea9d5a174b8610744db6b103
-bash-4.2$ curl --header "Accept: application/vnd.docker.distribution.manifest.v2+json" -I -X HEAD localhost:5000/v2/dubros/test/manifests/t2 2>/dev/null | grep Docker-Content-Digest | awk '{print $2}'
sha256:2e1a1a37978fae1d0fa6aff2aada9a512d5c811eea9d5a174b8610744db6b103


-bash-4.2$ docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
localhost:5000/dubros/test                                    latest              1feba5a478fe        9 months ago        204.9 MB
localhost:5000/dubros/test                                    t1                  1feba5a478fe        9 months ago        204.9 MB
localhost:5000/dubros/test                                    t2                  1feba5a478fe        9 months ago        204.9 MB
qa.registry.docker.site.gs.com/gs_cloud/httpd                 latest              1feba5a478fe        9 months ago        204.9 MB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions