Created
February 24, 2022 14:07
-
-
Save flavianmissi/5d262bc9c168c25f15a5778feafae3d1 to your computer and use it in GitHub Desktop.
delete container images matching grep pattern
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
PATTERN=localhost | |
# run the cmd below to see what you'll delete | |
# docker images --format '{{.ID}} {{.Repository}}' | grep ${PATTERN} | |
docker rmi $(docker images --format '{{.ID}} {{.Repository}}' | grep ${PATTERN} | awk '{print $1}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment