List all the tags for a image on docker hub

Something that you may want to know sometimes and docker cli does not show by default is all the tags for the image on docker hub. Here is example to list all tags fro the centos image

 

curl https://registry.hub.docker.com/v2/repositories/library/centos/tags |jq '."results"[]["name"]'

The example is for a v2 registry. The output for v1 is different than v2 registry. For a v1 registry, you can use command like below

 

curl https://registry.hub.docker.com/v1/repositories/centos/tags |jq '.[]["name"]'

This site uses Akismet to reduce spam. Learn how your comment data is processed.