Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 602 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 602 Bytes

dockerized postgres

You can use dockerized postgres to query your database, and manage backups, without locally installing postgres.

The commands work as usual, except:

  • Use host.docker.internal instead of localhost.
  • You can only access files in the current working directory (e.g. when dumping).

psql

dockerized psql --host "host.docker.internal" --username <username>

pg_dumpall

  dockerized pg_dumpall \
    --host "host.docker.internal" \
    --file "backup.sql" \
    --username root \
    --no-password \
    --quote-all-identifiers \
    --verbose