Last active
October 6, 2019 18:05
-
-
Save kb05/bcb7ac945d92c26e9028eb71a6f4d589 to your computer and use it in GitHub Desktop.
StopAllDocker
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 | |
sudo docker ps | cut -f 1 -d " " |tail -n +2 | xargs sudo docker stop | |
#sudo docker ps Get running docker containers | |
#Select only the id | |
#Ignore the first line ("Container") | |
#Pass to stop command each container |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment