Since 1.10, Docker implements a content addressable method based on a secure hash of the image and layer data:

sudo docker pull redis:5.0.2-alpine
sudo docker inspect --format '{{json .RootFS }}' redis:5.0.2-alpine | jq .
  "Type": "layers",
  "Layers": [

But is there a way to match the layers digest with an image name, either locally downloaded or in some repository?

As far as I can tell, docker search does not allow searching by digest. Or does it?

  • Hi and welcome! :-) What is your actual goal here? I.e why would smb need that? (use case) Dec 11 '18 at 4:21

The mapping between image manifest and layers goes the other way. You can have one or more image manifests pointing to a layer. And those images may not even be tagged with an image name, or a single image may have multiple tags. So I'm not aware of an easy way to do a reverse search. You would need to go through each image on the local system or registry to see what images point to that layer, and then search the tags to see what names that image has.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.