I'm just playing with a simple example to get a basic understanding of Docker going. Here is my Docker image file:
FROM python:3.7-alpine
# copy all the files to the container
COPY . /test
WORKDIR /test
# install dependencies
RUN pip install pip_system_certs --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org
RUN pip install -r requirements.txt
# run the command
CMD ["python", "./test_script.py"]
The trusted-host options are what allow us to get around corporate network security settings and install packages internally on windows and they seem to work in Docker too but only for some packages. For instance if my requirements.txt includes flask and requests everything is fine, but pandas and numpy give me
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)'))': /simple/numpy/
and fails. I think it's weird that this is working for some packages but not others.
Any help appreciated.
Using Docker Desktop in Windows 10.