How to know which version of docker image is behind latest tag?

is kinda BULLPOOP actually that docker do NOT do what is minimum of good sense and report such thing, and unfortunately the only solution I seem to find is ... oh well, ACTUALLY FISHING:

go to image webpage (nigix in my case) https://hub.docker.com/_/nginx then press tags tab, go to any latest, and copy sha256 sum then sort by newest, then scroll down until first numbered version and check if the exact same sha256 is displayed

now ... STILL after that fishing, there library/nginxit comes a sure thing:

you can verify if you did it right, for example now I manage to find that nginx:latest is actually 1.17.8, so, I run:

docker pull nginx:1.17.8
1.17.8: Pulling from library/nginx
bc51dd8edc1b: Pull complete
66ba67045f57: Pull complete
bf317aa10aa5: Pull complete
Digest:sha256:ad5552c786f128e389a0263104ae39f3d3c7895579d45ae716f528185b36bc6f
Status: Downloaded newer image for nginx:1.17.8

and then I verify by atempt to pull latest:

docker pull nginx:latest
latest: Pulling from library/nginx
Digest: sha256:ad5552c786f128e389a0263104ae39f3d3c7895579d45ae716f528185b36bc6f
Status: Downloaded newer image for nginx:latest

how you can see it didn't actually pull anything, and sha256 is the exact same ;)


Do you know if and where I can find this information?

Just to make something clear. Docker images can have multiple tags around them. Closer inspection of said images reveal that they have single tag only (just latest) so they are not tagged additionally. Thus said from images themselves you can't deduct which tensorflow version they relate to.

However, you do have other option:

  • Easiest way to make sure you use correct 'versioned' tensorflow image instead of latest is to actually start latest image:

    docker run -it --rm -p 8888:8888 tensorflow/tensorflow:latest
    

    or

    nvidia-docker run -it -p 8888:8888 tensorflow/tensorflow:latest-gpu
    

    then, navigate to given url link in format:

    http://localhost:8888/?token=XXXX...
    

    and in jupyter create new notebook File->New Noteboot->Python2 and there check tensorflow version by giving:

    import tensorflow as tf
    print tf.VERSION
    

    or

    import tensorflow as tf
    tf.__version__
    

    Then run it. Note that in my case for latest tag response was: 1.8.0, however if you pulled latest image a while ago and didn't update in the meantime (or reading this in the future) version you get can be different than this.

  • Once you got the version you are using, you can simply navigate at the the tags pages you mentioned in your post to take correct tag (in my case that would be 1.8.0 and 1.8.0-gpu respectively (since I was offered Python2 from latest tag).
  • Short note on selecting proper tag from suffixes (for 1.8.0 version):
    • In most cases you will select one of the following stable release images:
      • 1.8.0-gpu-py3 - stable release image gpu python 3
      • 1.8.0-py3 - stable release image cpu python 3
      • 1.8.0-gpu - stable release image gpu python 2
      • 1.8.0 - stable release image cpu python 2 <-- this is proper tag in my case for cpu latest.
    • However, you might choose development or release candidates in some special circumstances:
      • 1.8.0-devel-gpu-py3 - development release gpu python 3
      • 1.8.0-devel-gpu - development release gpu python 2
      • 1.8.0-devel-py3 - development release cpu python 3
      • 1.8.0-devel - development release cpu python 2
      • 1.8.0-rcN-devel-gpu-py3 - development release candidate gpu python 3
      • 1.8.0-rcN-devel-py3 - development release candidate cpu python 3
      • 1.8.0-rcN-gpu-py3 - stable release candidate gpu python 3
      • 1.8.0-rcN-py3 - stable release candidate cpu python 3
      • 1.8.0-rcN-gpu - stable release candidate gpu python 2
      • 1.8.0-rcN - stable release candidate cpu python 2