I am following the Docker-getting started guide to using docker with a python application, but when docker gets up to the command:
RUN pip install -r requirements.txt
I'm getting the following error message:
Step 4/7 : RUN pip install -r requirements.txt
---> Running in 98e18cf80a64
Collecting Flask (from -r requirements.txt (line 1))
Retrying (Retry(total=0, connect=None, read=None, redirect=None))
after connection broken by 'NewConnectionError
('<pip._vendor.requests.packages.urllib3.connection.Ver
ifiedHTTPSConnection object at 0x7fb43609ccd0>: Failed to establish a
new connection: [Errno 111] Connection refused',)': /simple/flask/
which repeats several times and then this appears:
Could not find a version that satisfies the requirement Flask (from -r
requirements.txt (line 1)) (from versions: )
No matching distribution found for Flask (from -r requirements.txt
(line 1))
The command '/bin/sh -c pip install -r requirements.txt' returned a
non-zero code: 1
pip seems to be working fine outside of the container. Is there any way i could allow it internet access? I have already set the proxy for docker and everything seems to be working fine except this (so far).
All the related questions address ubuntu or windows and are not usable for mac.
Thanks in advance.