You will get to see a lot like this error while working with docker and the VM/Servers that are running behind some proxy or managed by your organization.
Assuming you have the certificate issued by your IT team.
The following steps will help you get rid of this problem :
- Convert to .crt
openssl x509 -inform DER -in certificate.cer -out certificate.crt
- Make extra directory
sudo mkdir /usr/share/ca-certificates/extra
- Copy certificates over
sudo cp certificate.crt /usr/share/ca-certificates/extra/certificate.crt
- If not, then you have to do what I did, go to
sudo nano /etc/ca-certificates.conf
- Scroll down and find your .cer and remove the
!from in front of the file name (update-ca-certificates doc) - if you don't find your certificate run
Also if you are facing an error something like this.
ERROR: toomanyrequests: Too Many Requests.ORYou have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limits. You must authenticate your pull requests.
Also if you are facing an error something like this, then try to log in to your docker account on the machine/Server,
Because according to docker’s latest policy, The rate limits of container image requests per six hours is 100 for anonymous usage, and 200 container image requests per six hours for free Docker accounts. Image requests exceeding these limits will be denied until the six-hour window elapses.