Created
October 28, 2018 19:57
-
-
Save onahirniak/95c9fc14ba0fe5017f81d4818b3c7f58 to your computer and use it in GitHub Desktop.
[Docker] Stop containers and remove images
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 kill $(docker ps -q) | |
#remove all containers | |
docker rm $(docker ps -a -q) | |
#remove all docker images | |
docker rmi $(docker images -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment