Looking up docker image tags

This recipe is to check the tags defined for a specific Docker image in docker.hub.

The basic API is at https://registry.hub.docker.com/v2

So the format is as follows:



  • namespace : usually is the user account posting the image. For official images set the namespace to library.
  • image : Image name.


So, you can then use curl and jq to access the relevant data. For example, to get the tags, last updated time and digest as a tsv:

curl -s -L $URL | jq -r '(.results[] | select(.tag_status == "active") | [.name, .last_updated
, .digest]) | @tsv'

v1 API

You could also use the v1 API while it is still available: