Last active
November 26, 2020 22:03
-
-
Save crazyoptimist/ae347360e235db267f5d6ad4602665a1 to your computer and use it in GitHub Desktop.
Remove <none> tagged docker images
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
if [ -z "$(docker images | awk '/^<none>/ {print $3}')" ]; then | |
echo "You don't have any <none> tagged images." | |
else | |
docker rmi $(docker images | awk '/^<none>/ {print $3}') | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment