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 |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 |jq '.[]["name"]'

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