Skip to content

Instantly share code, notes, and snippets.

@nikescar
Created October 13, 2017 00:35
Show Gist options
  • Save nikescar/95fba10af6973a49bdf54481d0066fde to your computer and use it in GitHub Desktop.
Save nikescar/95fba10af6973a49bdf54481d0066fde to your computer and use it in GitHub Desktop.
Docker TIP
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