Hi,
I have a unique problem. I’m create an ASP.NET core application that will be accessing a postgres SQL on a host machine or host network. For development purpose I have community edition of docker on Windows 10 machine. I also have the POSTGRESQL on the same windows machine. I have exposed the ASP.NET service on the port 5000. The docker is a Linux docker and not windows docker
I have build the docker using the below dockerfile
FROM microsoft/aspnetcore:2.0
ENV ASPNETCORE_URLS="http://*:5000"
COPY . /app
WORKDIR /app
EXPOSE 5000
ENTRYPOINT [“dotnet”, “ContainerDASample.dll”]
when I run the docker normally using the command
“docker run -p 5000:5000 --name containerda containerda-img”
The health check (which is nothing but a Http 200 with a message )is working good but the endpoints that access the postgres are failing
When I run the docker command using the below command
docker run -p 5000:5000 --network=“host” --name containerda containerda-img
The health check itself fails.
So totally I’m at loss to understand how to make this application work with containers