Created
January 14, 2016 05:49
-
-
Save chnbohwr/476901acbc3a3347cc28 to your computer and use it in GitHub Desktop.
clean docker containers and volumes
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
echo 'kill all running container' | |
docker kill $(docker ps -q) | |
echo 'remove all container' | |
docker rm -v $(docker ps -a -q) | |
echo 'remove all volumes' | |
docker volume rm $(docker volume ls -q) | |
echo 'Delete all untagged/dangling (<none>) images' | |
docker rmi $(docker images -q -f dangling=true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment