Cannot download docker, how to fix this error

Hi @sabhyata

Please try using one of these methods:

  • Bypass SSL Verification (Quick Fix, Not Secure) – Use the -k flag with curl to ignore SSL issues.

  • Update CA Certificates (Recommended) – On Ubuntu/Debian, run sudo apt update && sudo apt install --reinstall ca-certificates. On CentOS/RHEL, use sudo yum reinstall ca-certificates.

I tried sudo apt update && sudo apt install --reinstall ca-certificates first , it did reinstall the certificate , however the curl command still failed -
sabhyatr@DESKTOP-L98PSFI:/mnt/c/Users/SabhyataRawat$ curl -fsSL https://get.docker.com -o get-docker.sh
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: curl - SSL CA Certificates

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

so then I went ahead and use -k … which did the job. Can youexplain whats with self signed certificate , why it couldn’t have worked?

also I am using WSL , could that be the issue , because now when I run the script -

Hi @sabhyata,

A self-signed certificate isn’t trusted by default because it’s not issued by a recognized Certificate Authority (CA). When you use curl, it fails to verify the certificate, causing the error. The -k flag skips the verification, which is why it worked, but it’s insecure and exposes you to security risks. The proper fix is to add the self-signed certificate to your trusted CA list or for the server to use a certificate from a trusted CA.

I see that you’re trying to install Docker on Windows. Have you tried following the guide here: Windows | Docker Docs? I mostly use Linux and macOS, so I don’t have much experience with installing Docker on Windows.