Skip to content

Instantly share code, notes, and snippets.

@nfvs
Last active February 6, 2017 18:19
Show Gist options
  • Save nfvs/6a88b0d13289f26e0ac0df1274e21109 to your computer and use it in GitHub Desktop.
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')
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