Good day to all,
I'm trying to get an image digest of a local image to track changes. I can get digests here:
$ docker images my/image --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
my/image commit-ec30af3 sha256:5952c64d6851381c2cbc1d16f6092e6718aa1bafe82daab661836010ad59e0db 9020181be91c 8 days ago 265MB
my/image latest sha256:5952c64d6851381c2cbc1d16f6092e6718aa1bafe82daab661836010ad59e0db 9020181be91c 8 days ago 265MB
my/image <none> sha256:1a886243d70276b9e6df04f4a7d728b95f6a31de763f2b227ff9d6d689ef883c ff3cc9ff736f 9 days ago 265MB
my/image <none> sha256:67f73eedc4ad23a75fc6d769dac74ad358d02a61845b0f1412d4228d21c50c9b 31075b42d215 9 days ago 265MB
my/image tag-initial sha256:2a30d97f533a019d91bf333db38d5769508d569c5b7897a9c6f56add14f1f49c cab098bbb99e 9 days ago 265MB
But if I'm trying to read only a specific image tag that I'm tracking changes digest disappears:
$ docker images my/image:latest --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
my/image latest <none> 9020181be91c 8 days ago 265MB
The same for other tags. No pushes or pulls are made between these two output examples. Images were pushed to the remote repository. I'm checking digests only for images 100% pushed to the remote repo.
I've checked this topic: Why doesn't my newly-created docker have a digest? but the difference is that digests in that topic were missing even when listing all images. In my case digest exists when listing multiple images and disappears when listing only a specific tag. Also, images were pushed to the remote repo before executing the above commands.
Why it's happening and how to get a digest of a specific tag?