Find all digests of an Image Tag on a Docker Registry

When one does continuous pushes (with updated content) to the same Docker Image Tag in a Docker Registry, the image in the registry will end up with multiple digests:

docker build -t test_repo:my_tag .
docker image tag test_repo:my_tag docker-registry.local.domain:5000/test_repo:my_tag
docker push docker-registry.local.domain:5000/test_repo:my_tag
→ digest: sha256:4f8f2ec8773c8cfe3d3432db5add85bd17c7e2a6a0e0f987d0783d31ddf3eabf
vim Dockerfile
→ Edit the Dockerfile in some way
docker build -t test_repo:my_tag .
docker image tag test_repo:my_tag docker-registry.local.domain:5000/test_repo:my_tag
docker push docker-registry.local.domain:5000/test_repo:my_tag
→ digest: sha256:d53a78d96bfb136b5f99a945f8a1671a1c365d8a2455bd4ba0c4f7a82409f007

A client is able to pull these different versions of the same image tag by using the digest value.

Is there a way to find these two digests of the same image tag (test_repo:my_tag) in the Docker Registry ?

I read through the documentation of the Docker Registry API and did some tests, but there doesn’t seem to be a documented solution.

It seems that only the latest digest (sha256:d53a78d96bfb136b5f99a945f8a1671a1c365d8a2455bd4ba0c4f7a82409f007) of this image tag (test_repo:my_tag) can be found from a registry:

curl -H “Accept: application/vnd.docker.distribution.manifest.v2+json” -X GET -vvv -k docker-registry.local.domain:5000/v2/test_repo/manifests/my_tag
→ Docker-Content-Digest: sha256:d53a78d96bfb136b5f99a945f8a1671a1c365d8a2455bd4ba0c4f7a82409f007

Docker Hub seems to have the same issue. When you open a public repository on Docker Hub you are only able to find the latest digest of a specific Image Tag.
Any other API endpoint I can try or some other solution ?

Docker Host OS: CentOS 7.6.1810
Docker Daemon Version: 19.03.5
Docker Registry Version: 2.X (The latest one from 2020)

If you retrieve the full Manifest, it includes a history section that appears to contain the digests you are looking for.

curl -X GET -vvv -k docker-registry.local.domain:5000/v2/test_repo/manifests/my_tag

Hi @rricardoflick,
Tag history (the list of digests previously associated with a tag) isn’t something registries, or the distribution-spec currently supports. It’s a highly desired feature, but not currently a standard.
We’re always interested in new issues, even better if someone wants to define how this would work: GitHub - opencontainers/distribution-spec: OCI Distribution Specification

Steve