0

Is there a way to query or find out which tag is effectively pulled with docker pull python.

I assume that docker pull python is the same as docker pull python:latest, but still then (at the time of asking this question), there is an ambiguity if python:latest refers to 3.14.0a3-bookworm, 3.14-rc-bookworm⁠, 3.14.0a3-slim-bookworm, 3.14-rc-slim-bookworm, 3.14.0a3-slim etc.

1 Answers1

2

The latest tag points to a digest in the repository. Other tags may also happen to point to that same digest, but there's no requirement for this, it's entirely up to the repository owner. You could query every tag to find the ones pointing to the same digest, but at present, that can be a lot of API calls.

Specifically for python, and at the time of this answer, the repository owner has specified the following under the shared tags section of the documentation:

  • 3.13.1, 3.13, 3, latest:
    • 3.13.1-bookworm⁠
    • 3.13.1-windowsservercore-ltsc2022⁠
    • 3.13.1-windowsservercore-1809⁠

In the case of the nested tags there, the bookworm and windowsservercore images do not have the same digest, but they contain platform specific images that are the same as those in the latest image. You can inspect the contents of the image with commands like:

docker buildx imagetools inspect python:latest
BMitch
  • 3,568
  • 12
  • 18