Skip Navigation

Confused about image digests

I've been thinking about writing a script that would alert me if there was an updated version of an image I was running.

DockerHub shows an image digest on the page for that tag:

And I can extract the digest for an image I am running with:

docker inspect --format='{{index .RepoDigests 0}}' jc21/nginx-proxy-manager:latest

This matches the one from the DockerHub screenshot. But I can't see a CLI way to get the image digest from a registry. It seems like:

docker manifest inspect jc21/nginx-proxy-manager:latest

should do it, but it pulls out the digest of each of the architecture builds for that tag instead of the one shown in dockerhub.

Is there a way to compare the current local image with one in a registry from the command line? Or perhaps there's a more sensible way to do this?

1
1 comments