Skip to content

Instantly share code, notes, and snippets.

@kekru
Last active November 21, 2016 15:44
Show Gist options
  • Save kekru/c10702ad56313bc2385bb81889cfb4d5 to your computer and use it in GitHub Desktop.
Save kekru/c10702ad56313bc2385bb81889cfb4d5 to your computer and use it in GitHub Desktop.

Docker useful commands

Stop and remove all running containers:
docker stop $(docker ps -aq) && docker rm $(docker ps -aq)

Remove all stopped containers:
docker rm $(docker ps -aq)

Remove untagged/dangling/<none> images
docker rmi $(docker images -q -f dangling=true)

#Install utilities
Install ping (Ubuntu)
apt-get install iputils-ping

Install nslookup (Debian, Ubuntu)
apt-get install dnsutils

#See also
wsargent/docker-cheat-sheet
Docker Cleanup Commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment