-
-
Save afrikaan-official/37c3d5622a738028a8c0da2414dadbea to your computer and use it in GitHub Desktop.
Docker CLI Cheatsheet
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
# List all stopped containers | |
docker ps --filter "status=exited" | |
# Remove all stopped containers | |
docker rm $(docker ps --filter "status=exited" -aq --no-trunc) | |
# Remove all unused images (http://stackoverflow.com/a/32723127) | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) | |
#Remove dangling Images | |
docker rmi $(docker images -q -f "dangling=true") | |
#Remove Dangling Volumes | |
docker volume rm $(docker volume ls -q -f "dangling=true") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codefresh.io/blog/everyday-hacks-docker/