Created
April 2, 2015 05:54
-
-
Save rpherrera/4b02f24f7e13dedcde9b to your computer and use it in GitHub Desktop.
clean (kill and remove) all docker containers
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
#!/bin/bash | |
docker ps -a | awk '{ print $1 }' | grep -v CONTAINER | while read container_id; do docker kill $container_id; docker rm $container_id; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment