How to tell the software version under a tag on Docker hub How to tell the software version under a tag on Docker hub jenkins jenkins

How to tell the software version under a tag on Docker hub


For the repo you asked, the answer is No.

When setup repo on dockerhub, there are two kinds of options for user to choose as follows:

1) Create Repository:

In this way, dockerhub just create a repo for user, and user need to build his own image on local server, tag it, and push it to dockerhub.

When user push his image to dockerhub, no additional information about the source version will be appended, so can't get any source map from dockerhub.

jenkins/jenkins, just this kind of repo.

2) Create Automated Build

In this way, dockerhub will fetch the code from github or bitbucket, and build the image on its cloud infrastructure, so it will know exactly what source commit is for current docker image.

jenkins/jnlp-slave, just this kind of repo.

Then, you can click its Build Details on the web page, click into one link, e.g. 3.26-1-alpine, you will see log mentioned 0a0239228bf2fd26d2458a91dd507e3c564bc7d0 is the source commit.

To sum up, for the repo you mentioned in the question, they are not Automated Build, so you cannot get the map for the image & source code, but if you happen to find a repo in dockerhub which is Automated Build later & want to know the map, then you can.


As long as I understand your question, you are trying to tag the docker image exact with same version as of your software version. For that I use to create image tag:

$ export VERSION="2.31-b19" $ docker tag "<user>/<image>:${VERSION}" "<docker_hub_user>/<repo>:latest"

If this is not the case. Please explain your use case a bit more so that we can provide you a better workaround.