Last active
May 16, 2022 17:13
-
-
Save Shelob9/9b5a26ba44c8abf852adadbd22d5377b 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
# create webserver called webserver | |
docker run --detach --publish 80:80 --name webserver nginx | |
## http://blog.baudson.de/blog/stop-and-remove-all-docker-containers-and-images## | |
#List all containers (only IDs) | |
docker ps -aq | |
#Stop all running containers | |
docker stop $(docker ps -aq) | |
#Remove all containers | |
docker rm $(docker ps -aq) | |
#Remove all images | |
docker rmi $(docker images -q) |
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
docker kill $(docker ps -q) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment