SSL: CERTIFICATE_VERIFY_FAILED error in a docker container

17,039

adding RUN apt-get install ca-certificates to my Dockerfile worked for me.

Share:
17,039

Related videos on Youtube

cid
Author by

cid

Updated on September 18, 2022

Comments

  • cid
    cid over 1 year

    I'm running into the following error message when I do easy_install pip:

    root@ff45b7b74944:/# easy_install pip
    Searching for pip
    Reading https://pypi.python.org/simple/pip/
    Download error on https://pypi.python.org/simple/pip/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    Couldn't find index page for 'pip' (maybe misspelled?)
    Scanning index of all packages (this may take a while)
    Reading [--https link here, like above--]
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    No local packages or download links found for pip
    error: Could not find suitable distribution for Requirement.parse('pip')
    

    This is run in a docker container that runs on ubuntu:latest. I'm leaning towards the fact that it can't do openssl stuff (https link), but I'm not completely certain. If anyone has a solution or any troubleshooting methods, I'd love to find out.

    Thanks.

  • marcellothearcane
    marcellothearcane almost 4 years
    I get apt-get not found
  • Matt
    Matt almost 4 years
    @marcellothearcane that command depends on the distribution you're using. apt-get is used in debian/ubuntu distros (and probably others), but not all.
  • marcellothearcane
    marcellothearcane almost 4 years
    It was, (Ubuntu 20.04) but I'm afraid my computer was just being really weird.