Last active
April 11, 2018 11:48
-
-
Save blobor/ea1cd7c73c3fa8e45f5ac78c6c970e36 to your computer and use it in GitHub Desktop.
Docker helpers
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
# Remove dangling images | |
docker images -f dangling=true ## List | |
docker rmi $(docker images -f dangling=true -q) ## Remove | |
## Remove all images | |
docker images -a ## List | |
docker rmi $(docker images -a -q) ## Remove | |
# Remove all exited containers | |
docker ps -a -f status=exited ## List | |
docker rm $(docker ps -a -f status=exited -q) ## Remove | |
# Stop and remove all containers | |
docker ps -a # List | |
docker stop $(docker ps -a -q) # Stop | |
docker rm $(docker ps -a -q) # Remove | |
# Remove dangling volumes | |
docker volume ls -f dangling=true ## List | |
docker volume rm $(docker volume ls -f dangling=true -q) ## Remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment