Skip to content

Instantly share code, notes, and snippets.

@NicolasRitouet
Last active August 29, 2015 14:07
Show Gist options
  • Save NicolasRitouet/7f3a44f53e16319905d1 to your computer and use it in GitHub Desktop.
Save NicolasRitouet/7f3a44f53e16319905d1 to your computer and use it in GitHub Desktop.
Cheat-sheet for Docker
stop all containers:
sudo docker stop $(sudo docker ps -a -q)
Remove all containers:
sudo docker rm $(sudo docker ps -a -q)
Get id of last container:
sudo docker ps -l -q
Stop last container:
sudo docker stop $(sudo docker ps -l -q)
Remove last container:
sudo docker rm $(sudo docker ps -l -q)
Remove all images:
sudo docker rmi $(sudo docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment