Last active
March 10, 2020 20:39
-
-
Save msauza/278f4bb50f33b6c882a93d3f1d017110 to your computer and use it in GitHub Desktop.
Docker commands
This file contains 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
### List running containers | |
docker ps | |
### List all containers | |
docker ps -a | |
### List successfully stopped containers | |
docker ps -f "status=exited" | |
### Stop all containers | |
docker stop $(docker ps -a -q) | |
### Remove all containers | |
docker rm $(docker ps -a -q) | |
### List all images | |
docker images ls | |
### Remove all images | |
docker rmi $(docker images -a -q) | |
### Prune unused Docker objects | |
docker system prune | |
### https://docs.docker.com/engine/reference/commandline/docker/ | |
### https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ | |
### https://docs.docker.com/config/pruning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment