Created
October 15, 2015 21:48
-
-
Save sylwit/d99478d920ee5d0f8dd3 to your computer and use it in GitHub Desktop.
clean 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
| function docker.clean_containers() { | |
| docker rm $(docker ps -a | grep -v Up | grep -v CONTAINER | cut -f 1 -d ' ') | |
| } | |
| function docker.clean_images() { | |
| docker rmi $(docker images | grep none | tr -s ' ' | cut -f 3 -d ' ') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment