Skip to Content

You are here

curl 60 ssl certificate problem: unable to get local issuer certificate - docker desktop image build

Blogging after long time as things could get busy sometimes...

Well recently, I encountered an error for SSL certificate in one of our projects working with Docker desktop while building an Image.
"curl 60 ssl certificate problem: unable to get local issuer certificate"

I was wondering what could be the issue.
my first guess was that its something to do with my local machine's certificate as error says.
so I tried few options as I found from the stackoverflow:
1. install the ca-certificates with following command:
sudo apt-get install ca-certificates
sudo apt-get install reinstall ca-certificates
sudo update-ca-certificates -f

But apparently it didn't work, had to find some other way.
2. some places used the certificate from curl.se :
curl -k https://curl.se/ca/cacert.pem
download above certificte to the system and put it under /etc/ssl/certs/ca-certificates.crt
it still didn't work to get the composer working.

3. Final option was to check with the system administrators;
Ideally, this should have been first option..lolz. but I used this as last option.
According to them if you are in corp network you should use build option in docker.

docker build --build-arg http_proxy=YOUR_COMPANY_PROXY_URL:PORT
and it worked !!!

as it took few hops to different teams and stackoverflows thought to save some time for others !!
hope it will work for you too..

Tags: