Created
July 22, 2014 21:22
-
-
Save jmvrbanac/57869866954854dbc513 to your computer and use it in GitHub Desktop.
Cleanup all non-running 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
#!/bin/bash | |
sudo docker rm `sudo docker ps --no-trunc -a -q` | |
sudo docker rmi $(sudo docker images | awk '$1!~/centos/ && NR>1 {print $3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment