docker

Documentation is quite detailed and clear. 💯

(mini) Cheat sheet

  • List dockers container, images via docker ps -a. This lists all the containers even if they are stopped.
  • docker ps shows only the running containers
  • Remove images (To clean up disk space) using docker rm -f <name> (Name is the last column in docker ps output)
  • docker <system/image/container/network> prune : Removed unused objects.
    • Use system option to "Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes."
  • Remove dangling images (They take up disk space leading to No space left on device error)
    • docker volume rm $(docker volume ls -qf dangling=true)

Some specific commands in Postgres