Last active
February 6, 2017 18:19
-
-
Save nfvs/6a88b0d13289f26e0ac0df1274e21109 to your computer and use it in GitHub Desktop.
Print all tags of a particular Docker repo's latest image (except 'latest')
This file contains 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
docker images $REPO | awk '{if ($2 == "latest") print $3;}' | xargs sh -c 'docker images | grep $0' | awk '{if ($2 != "latest") print $2;}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment