Skip to content

Instantly share code, notes, and snippets.

@marcelblijleven
Last active October 26, 2017 09:16
Show Gist options
  • Save marcelblijleven/138244a380403fa894d8682ec8a6fb3a to your computer and use it in GitHub Desktop.
Save marcelblijleven/138244a380403fa894d8682ec8a6fb3a to your computer and use it in GitHub Desktop.
Useful docker commands
# 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