I am running an ASP.NET Core 1.1 Web API in a Docker 1.13.1 container on Ubuntu 14.04.
When the code attempts to retrieve some data from an HTTPS server, I get this certificate authentication error:
An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates
at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
The HTTPS server is internal with certificate signed by our corporate CA, so am aware that I may need to register the internal CA.
Everything I've found so far about this error and Docker talks to getting docker itself running, connecting to repos etc. My Docker is working fine, and the Web API runs on the Ubuntu server outside of the container without a problem.
1) Do I need to add a CA root certificate inside a docker image?
2) If so, how do I do it?
3) If not, how do I fix this?