title: How do I add a CA root certificate inside a docker image?
body: <p>I am running an ASP.NET Core 1.1 Web API in a Docker 1.13.1 container on Ubuntu 14.04.</p>
  
  <p>When the code attempts to retrieve some data from an HTTPS server, I get this certificate authentication error:</p>
  
  <pre><code> An error occurred while sending the request. ---&gt; 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)
  </code></pre>
  
  <p>The HTTPS server is internal with certificate signed by our corporate CA, so am aware that I may need to register the internal CA.</p>
  
  <p>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.</p>
  
  <p>1) Do I need to add a CA root certificate inside a docker image?</p>
  
  <p>2) If so, how do I do it?</p>
  
  <p>3) If not, how do I fix this? </p>