CMD to check if an image is already pushed to registry


Is there any cmd to check if a docker image is already pushed to container registry?


1 Like

You can use the docker registry API to check if a manifest exists:

curl \
  -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
  -H "Authorization: Bearer $(fly auth token)" \

If you want to test if the remote image is the same as the local image, you can compare the config.digest field of the response with the Id field in the output of docker image inspect ....


Oh that should work, thanks!