Quick reference guide for Docker commands - not at all exhaustive, just a cheat sheet.
Monitoring/Removing Images task command list images docker imagesremove specific image(s) docker rmi <image_id> <image_id> ...remove dangling images docker image pruneremove all unused images docker image prune --allremove all images docker rmi -f $(docker images -q)
Monitoring/Killing Containers task command notes see running containers docker pslike ps in bash! see most recently launched container docker ps -l-l for lastsee all containers docker ps -a-a for allsee hash of running containers docker ps -q-q for hashsee hash of most recent container docker ps -qlmix -q and -l for hash of last see hash of all containers docker ps -aqditto for -a and -q see running processes docker top id containeruse id container kill all running containers docker kill $(docker ps -q)kill only stops running containerskill most recent container docker kill $(docker ps -ql)remove all exited containers docker container pruneremove all containers docker rm -f $(docker ps -qa)-f forces rm to kill and removeremove old containers docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs docker rmremoves containers that are created weeks ago