Running discourse with Postgres running in docker

That means Discourse is trying to connect via a filesystem socket and that socket doesn’t exists.

Can you try adding a port: 5432 to the config/database.yml file, under the development section?