uwsgi-nginx-flask-docker icon indicating copy to clipboard operation
uwsgi-nginx-flask-docker copied to clipboard

SSL: CERTIFICATE_VERIFY_FAILED

Open drount opened this issue 4 years ago • 8 comments

Hello,

after building an image yesterday based on: FROM tiangolo/uwsgi-nginx-flask:python3.8 or FROM tiangolo/uwsgi-nginx-flask:python3.7

I got this error when conecting to any HTTPS server:

ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)> (caused by URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))"

I had to add: RUN apt-get update && apt-get install -y ca-certificates to my Dockerfile in order to fix it.

Reporting just in case you want to add it to the root image or it helps anybody in the future.

drount avatar May 19 '20 09:05 drount

Hey, @drount ! Thanks for giving the fix :blue_heart: . I was facing the exact same problem and this helped a lot.

sameshl avatar May 22 '20 15:05 sameshl

Looking at the dates, it seems docker hub should be updated with that fix, but I still have server certificate verification failed. when pulling git requirements for example.

ybizeul avatar Jun 30 '20 08:06 ybizeul

I don't see the changes in the source code

drount avatar Jul 17 '20 08:07 drount

Had to add this to my own docker file and this seemed to fix it for me:

RUN apt-get update
RUN apt-get install -y --reinstall ca-certificates

ssilverm avatar Aug 31 '20 13:08 ssilverm

i believe this is still an issue. above suggestions didnt work for me

gamarobert avatar Sep 22 '20 19:09 gamarobert

Thank you very much. This helped me a lot.

cleobatista avatar Dec 28 '20 16:12 cleobatista

How can I fix this on windows?

Sana-Rasheed avatar Feb 24 '21 13:02 Sana-Rasheed

This is still an issue for me too. Had to run ca-certificates as described to fix

bignellrp avatar Sep 01 '21 15:09 bignellrp