Created
April 13, 2016 18:52
-
-
Save tylerbrandt/1ab54fe5139e69b4e2c7e7cdd75a1714 to your computer and use it in GitHub Desktop.
docker-clean
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
# Docker clean | |
function docker-clean() { | |
# http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/ | |
docker rm -v $(docker ps -a -q -f status=exited) | |
docker rmi $(docker images -f "dangling=true" -q | tr -s " " | cut -d" " -f 3) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment