Created
October 13, 2017 00:35
-
-
Save nikescar/95fba10af6973a49bdf54481d0066fde to your computer and use it in GitHub Desktop.
Docker TIP
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
My favorite way of removing all stopped docker containers is: | |
docker ps -q |xargs docker rm | |
it will list all images (docker ps), but only show the id's. And then run a docker rm command for each one of them. | |
Similarly for removing all unused docker images | |
docker images -q |xargs docker rmi | |
Will list all docker images and then docker rmi them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment