1

Is there a way to get the tag/version of a Docker image that has been pulled weeks back using the latest tag?

A couple of months back I pulled gitlab/gitlab-ce:latest and there were new versions on Docker Hub meanwhile. I would like to know what exact version I pulled. It could for instance be the version 10.3.9-ce.0. The current tag of latest points to 10.7.3-ce.0 though.

Is it possible to find out the pulled tag/version?

I already tried to use docker inspect gitlab/gitlab-ce, but the only information I could find was RepoTags pointing to gitlab/gitlab-ce:latest. Though there doesn't seem to be a specific version.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Socrates
  • 8,724
  • 25
  • 66
  • 113
  • The only authoritative identity of a docker image is its ID. Use that. – Jonathan Hall May 20 '18 at 16:35
  • @Flimzy Ok, I believe you speak about the `RepoDigests` entry pointing to an alpha numeric `sha256` key? How would I find the appropriate tag/version to the key on https://hub.docker.com/r/gitlab/gitlab-ce/tags/? – Socrates May 20 '18 at 16:38
  • I'm speaking about the image ID. – Jonathan Hall May 20 '18 at 16:39
  • @Flimzy In understand. Is there a way to find the associated tag? – Socrates May 20 '18 at 16:39
  • This might help: https://stackoverflow.com/q/31251356/13860 – Jonathan Hall May 20 '18 at 16:47
  • It's ugly, but try Googling the digest value. I was trying this and realized I only had the `alpine:latest` image and wanted to figure out which actual version that associated with. The digest (found with `docker inspect image alpine`) is alpine@sha256:7df6db5aa61ae9480f52f0b3a06a140ab98d427f86d8d5de0bedab9b8df6b1c0. Searching the internet happened to find https://github.com/docker-library/repo-info/blob/master/repos/alpine/tag-details.md, which told me it's v3.7. I got lucky because it's a popular image -- that won't work on private registries. Might workin your case? – brandon-barnett May 20 '18 at 17:35
  • @brandon-barnett Indeed it is more matter of luck to find the appropriate tag this way. Tried it out, Google finds nothing, regettably. – Socrates May 20 '18 at 18:09
  • @Flimzy Ok, Docker Registry might be a way to find this out, but it is quite cumbersome. – Socrates May 20 '18 at 18:14
  • 1
    @Socrates: I was noticing the same :/ Can you not determine the version of gitlab by starting the docker image, and connecting to it? – Jonathan Hall May 20 '18 at 18:32
  • This may be helpful: https://stackoverflow.com/a/55105643/3781261 – selurvedu Mar 11 '19 at 16:05

0 Answers0