We have an API endpoint that is accessible from our company’s IP address. The curl command works fine when executed from Windows PowerShell and also functions correctly inside WSL2. However, when running the same curl command from a Docker container within WSL2, it fails with an SSL error.
Here is the error message:
curl -v https://wrdes.dev.lktr.com/sdsdss/ewf/report?reportName=XYZ
* Trying 10.44.11.112:443...
* Connected to wrdes.dev.lktr.com (10.44.11.112) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: Connection reset by peer in connection to wrdes.dev.lktr.com:443
* Closing connection 0
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to wrdes.dev.lktr.com:443
I have attempted to resolve the issue by updating the certificates and modifying resolv.conf, but the problem persists.
Please note that the Docker image I am using is from Astro Airflow, which limits my ability to modify the Dockerfile. The Dockerfile simply references the Astro API where the Dockerfile resides.
Do you have any suggestions for resolving this issue?
5