Docker Notes

  • docker
  • docker compose

Docker

docker run

  • -d detach, run in background

docker ps: show running containers

  • -a all containers
  • -l show last created
  • -q show only container id
  • -s also show size docker stop $(docker ps -aq) # stop all containers

docker rm CONTID: remove container

  • --force remove force with SIGKILL
  • docker rm $(docker ps -aq) remove all containers

docker system prune: remove all unused images

  • -a remove all unused images
  • -f no confirm

docker image ls