By running PostgreSQL inside a Docker container, it is easier to isolate system dependencies, test new versions, and apply upgrades without affecting the host machine. A "Dockerized" version of PostgreSQL is nearly identical to a non-Docker version.

Connecting via psql

psql -h hostname -U username -d database

Restarting PostgreSQL

docker restart postgres

File Locations

  • Configuration Files: /data/postgres/config/postgresql.conf
  • Log files: /data/log/postgres