I have Postgresql on a server in a docker container. How can I connect to it from the outside, that is, from my local computer? What setting should I apply to allow that?
I know this is late, if you used docker-compose like @Martin
These are the snippets that helped me connect to psql inside the container
docker-compose run db bash
root@de96f9358b70:/# psql -h db -U root -d postgres_db
I cannot comment because I don't have 50 reputation. So hope this helps.