Last active
September 30, 2020 17:48
-
-
Save andi1984/b7322c213580404e58daf6f86ffd1f25 to your computer and use it in GitHub Desktop.
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# Delete all containersdocker | |
rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q)# Prune unused volumesdocker volume prune |
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
# Stop containers forever | |
docker stop $(docker ps -a -q) &docker update --restart=no $(docker ps -a -q) &systemctl restart docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment