List tags related to one or more Docker images.
Usage:
docker run --rm gautaz/docker-tags busybox alpine gautaz/docker-tags
You can also filter tags by using a regular expression:
docker run --rm gautaz/docker-tags 'alpine:^3\\.[89]'
To escape a character in the regular expression, you will need to surround the expression with quotes and also use
\\
instead of\
. This is due to the fact that the\
character needs to be left uninterpreted by the shell and escaped from thejq
expression.You might not quote the expression but this means you will also have to escape the
\
character for the shell (\\\\
).
Credits: RobV8R