Created
July 28, 2014 12:36
-
-
Save nickstenning/53cb1b40ce9309245561 to your computer and use it in GitHub Desktop.
Docker cleanup aliases
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
alias dockercleancontainers="docker ps -a --no-trunc | grep 'Exit' | awk '{print $1}' | xargs docker rm" | |
alias dockercleanimages="docker images --no-trunc | grep none | awk '{print $3}' | xargs docker rmi" | |
alias dockerclean="dockercleancontainers && dockercleanimages" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment