Created
June 19, 2014 03:59
-
-
Save runlevel5/53c6deb22a2bc04e93f8 to your computer and use it in GitHub Desktop.
Destroy untagged docker images
This file contains hidden or 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
#!/bin/bash | |
IMAGE_IDS=$(docker images | grep "^<none>" | awk "{print $3}") | |
if [ -n "$IMAGE_IDS" ]; then | |
docker rmi $IMAGE_IDS > /dev/null 2>&1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment