- Create new database user with password for docker.
- Configure
postgresql.conf
to listen for connection from docker network which usually is172.17.0.0/16
. The file's usually located at/usr/local/var/postgres/postgresql.conf
for Mac OS X.
Example, add this entry into postgresql.conf
file.
listen_addresses = '172.17.0.0/16, localhost'