Last active
October 26, 2017 09:16
-
-
Save marcelblijleven/138244a380403fa894d8682ec8a6fb3a to your computer and use it in GitHub Desktop.
Useful 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 just the container id's (quiet) | |
docker ps -q | |
# list all containers (all) | |
docker ps -a | |
# filter containers on status | |
docker ps -a -f status=exited | |
# remove docker by id | |
docker rm $id | |
# remove all exited containers | |
docker rm $(docker ps -a -q- f status=exited) | |
# run detached python image | |
docker run -it python |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment