Docker Community Forums

Share and learn in the Docker community.

Access postgres localhost from docker image on Windows

Hello! I’m new to docker.

I need my .net core app, running in a docker image, access to the database stored on my localhost machine.
I understand that docker gives an error because it gets Postgres ‘localhost’ as its own inner localhost.
But how to configure it to force understand the difference? and access the database on my localhost machine?
If I connect to the Postgres database on another server (with another IP) it works fine.

Could someone, please help me?
Many thanks in advance!