0

How to get sha's of all the tags corresponding to an image on docker hub. For instance, consider an image with latest, latest-windows and latest-linux tags. On docker pull image_name:latest, docker will automagically pull the correct image based on the OS from which the command is being run.

How can I get the SHA's for all the three tags. I found that we can do it using manifest-tool. Is there a way we can do this by using only docker.

EDIT:

docker inspect image_name:tag will return the sha of only one of the tags either windows or linux depending on the operating system.

Shubham
  • 2,943
  • 3
  • 28
  • 44
  • Possible duplicate of [Where can I find the sha256 code of a docker image?](https://stackoverflow.com/questions/32046334/where-can-i-find-the-sha256-code-of-a-docker-image) – callmemath Mar 21 '19 at 19:17
  • Not a duplicate. Added an edit explaining. – Shubham Mar 21 '19 at 19:20
  • latest-windows and latest-linux aren't official tags. You can run the command 3 times and check the difference using bash. Also, it seems odd to use latest-windows and latest-linux tags as docker is build to run on multiple os using the same image. Maybe you should reconsider your idea – callmemath Mar 21 '19 at 19:30

0 Answers0