I'm quite new to Docker and I'm wondering how I can connect (httpclient get request) to a non-containerised application running on IIS that uses SSL (localhost) from a container?
The application i'm trying to connect to and the one i'm running in a container are both .NET Core and i'm using Visual Studio to debug this with it's container tools.
I have found the host.docker.internal allows me to connect to the non-containerised application on a http binding, but when I try to connect to the 443 version it gives me an exception that it doesn't trust the binding with little other information.
The exception when I make a standard http client request:
The remote certificate is invalid according to the validation procedure.
I have tried installing localhost and host.docker.internal certificates created with OpenSSL onto the docker container i'm running from - with no success.
The code i'm running to copy and install the docker cert:
WORKDIR /src
RUN apt-get update && apt-get install -y curl && apt-get install -y ca-certificates
COPY ./myLocal.crt /usr/local/share/ca-certificates/myLocal.crt
RUN update-ca-certificates
Am I missing a vital step to this? Thanks