Created
May 19, 2015 11:02
-
-
Save buckett/577020ab3260c5eafe4b to your computer and use it in GitHub Desktop.
Cleans out old docker images and containers.
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 | |
# Clean all exited containers | |
docker ps -qaf status=exited | xargs docker rm | |
# Remove all unused images | |
docker images -f dangling=true -q | xargs docker rmi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment