skip to Main Content

I try to connect a remote elastic cluster that is available from the host (Windows 10 Enterprise) system.

I tested the host’s connection via curl https://url.to.target:443. Got that ‘For sure, its search’-Response.

When i try the same from inside the webserver-container (Debian GNU/Linux 10 (buster)) it failes by:

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. 

Is there a simple way use the hosts certificates store?

2

Answers


  1. Have you tried it by adding the insecure option to the .curlc file in your Home dir?

    echo insecure >> $HOME/.curlrc
    

    Shouldn’t be used in production!

    Login or Signup to reply.
    • Copy yourcert.crt to .ddev/web-build folder.
    • Create a custom .ddev/web-build/Dockerfile, for example:
        ARG BASE_IMAGE
        FROM $BASE_IMAGE
        COPY ./yourcert.crt /usr/local/share/ca-certificates/
        RUN update-ca-certificates --fresh
    
    • When referencing the cert in your code use:
      $myCert=’/usr/local/share/ca-certificates/yourcert.crt’;
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search