For some reason 5432 port seems protected. I changed my port config from 5432:5432
to 5416:5432
and the following command worked to connect to your postgres database from outside its docker container:
psql -h localhost -p 5416 -U <my-user> -d <my-database>