how to connect psql on host to postgres running ina container code example
Example: connect to postgres database in docker container
$ docker exec -it postgres-container psql -U postgres
$ docker exec -it postgres-container psql -U postgres