Created
February 17, 2022 15:52
-
-
Save zalexki/ccdfe28687911985dbdf4de866ff21e3 to your computer and use it in GitHub Desktop.
list tags docker hub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: | |
# $ docker-show-repo-tags.sh ubuntu centos | |
for Repo in $* ; do | |
curl -s -S "https://registry.hub.docker.com/v2/repositories/library/$Repo/tags/" | \ | |
sed -e 's/,/,\n/g' -e 's/\[/\[\n/g' | \ | |
grep '"name"' | \ | |
awk -F\" '{print $4;}' | \ | |
sort -fu | \ | |
sed -e "s/^/${Repo}:/" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment