Created
January 13, 2016 04:02
-
-
Save fragmede/1ed976912f29f2f76cee to your computer and use it in GitHub Desktop.
my script to cleanup stale 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 | |
df -h / | |
docker rm $(docker ps -a -q) | |
# add -a to 'docker images' for nested but those usually fail. | |
docker rmi $(docker images | grep "^<none>" | awk '{print $3}' ) | |
df -h / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment