Skip to content

Instantly share code, notes, and snippets.

@zalexki
Created February 17, 2022 15:52
Show Gist options
  • Save zalexki/ccdfe28687911985dbdf4de866ff21e3 to your computer and use it in GitHub Desktop.
Save zalexki/ccdfe28687911985dbdf4de866ff21e3 to your computer and use it in GitHub Desktop.
list tags docker hub
#!/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