Docker Community Forums

Share and learn in the Docker community.

Can't ignore ssl connection in docker container

Hi all,
I tried to connect esxi server(https://xxxx.com:443/sdk) by Vsphere api C#.
It’s work when it is running in .net framework or .netcore project on windows platform.
However, it’ll return error ssl connect when netcore project is running in docker container(Linux).
The source code as follow:

using (var handler = new HttpClientHandler())
{
handler.ServerCertificateCustomValidationCallback = (message, xcert, chain, > errors) => true;
}
ClientServiceContent = VimClient.Connect(HostName,CommunicationProtocol.Https,443);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Connection Exception

In Dockerfile,

FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /app
EXPOSE 443
COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "test.netcore.dll"]

I aslo try to use curl -k xxx.com:443/sdk, but it’s not work. Could someone give me some hints? Thanks.

hello did you get any solution for this issue ?i am also running similar kind of issue .