Last active
October 23, 2016 17:03
-
-
Save masimplo/409d92796276d9f032c274bf8e2e1986 to your computer and use it in GitHub Desktop.
Docker commands
This file contains hidden or 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 all images | |
| docker rmi $(docker images -q) | |
| # Remove all untagged images | |
| docker rmi $(docker images | grep "^<none>" | awk '{print $3}') | |
| # Remove all running containers | |
| docker rm -f $(docker ps -a -q) | |
| # Remove all tangling volumes | |
| docker volume rm $(docker volume ls -qf dangling=true) | |
| # if cannot remove image due to repository conflict (two tags have same image id) first do | |
| docker rmi {REPOSITORY_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment