Created
December 13, 2015 19:50
-
-
Save jalexanderfox/888f266e78e4ff54134d to your computer and use it in GitHub Desktop.
Stop all running docker containers, then delete them all including their images (useful for when a containers get corrupted and an automated process pulls the latest)
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 | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment