Created
October 21, 2016 10:39
-
-
Save zot24/75f73de78f9e3b1fcb6329cb93597104 to your computer and use it in GitHub Desktop.
Clean docker containers, images., volumes and netwroks
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 | |
| docker stop $(docker ps -a -q) && \ | |
| docker rm $(docker ps -a -q) && \ | |
| docker rmi -f $(docker images -q) && \ | |
| docker volume rm `docker volume ls -q` & \ | |
| docker network rm $(docker network ls | tail -n+2 | awk '{if($2 !~ /bridge|none|host/){ print $1 }}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment