Skip to content

Instantly share code, notes, and snippets.

@gpsarkar
Created February 17, 2020 19:51
Show Gist options
  • Select an option

  • Save gpsarkar/4d8acb20f3f87561bc7b282472cf0b4e to your computer and use it in GitHub Desktop.

Select an option

Save gpsarkar/4d8acb20f3f87561bc7b282472cf0b4e to your computer and use it in GitHub Desktop.
Connec to postgres on host from docker
docker run --rm -it -p 5433:5433 --add-host=localhost:192.168.1.2 -p 80:80/tcp myimage:latest
C:\Program Files\PostgreSQL\11\data\pg_hba.conf
host all all 172.17.0.1/16 md5
host all all 192.168.1.2/32 md5
C:\Program Files\PostgreSQL\11\data\postgresql.conf
listen_addresses = '*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment