Docker Image Does Not Connect To PostgreSQL Database

7
Hi all, My question is a replicate of https://community.mendix.com/link/questions/104921. My application is written 9.6.9 and I have followed all the steps for building and running my Docker image. When running my Docker image locally, it is unable to connect to PostgreSQL on my machine itself. I’ve attempted the solution provided in the question above (see below), but to no avail. Any other way I can connect to my database? docker run -it \ -e ADMIN_PASSWORD=Password1! \ -e DATABASE_ENDPOINT=postgres://{myUserName}:{myPassword}@docker.for.win.localhost:5432/{myDBName} \ mendix/mendix-buildpack:v1.2 I’m using Docker V20.10.12
asked
1 answers
3

Using host.docker.internal instead of docker.for.win.localhost worked for me

answered