Skip to content

Latest commit

 

History

History

postgres

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

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