0

I am a beginner of DOCKER user, and is trying to follow the docker instruction to get a first try. .

Here is the instruction link: https://docs.docker.com/get-started/part2, I have followed, But when I was to run this step, " docker build -t friendlyhello .", I always see this type of failure:

Collecting Flask (from -r requirements.txt (line 1))
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b1ce8301950>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b1ce8301b50>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b1ce83011d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b1ce8301710>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b1ce8301150>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/flask/
  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

I have googled and have found the similar report here: Can't download python packages onto Docker image

But theirs is contributed to using bad DNS value in docker, while in my env, I was able to run same cmd: "docker run busybox nslookup google.com", w/ or w/o giving explicit DNS value.

So what might be the cause of my failure ?

Thanks,

-cji

FewDexter
  • 446
  • 4
  • 11
user3595231
  • 711
  • 12
  • 29
  • You can test it by running `docker run -it python:2.7-slim bash` then `pip install Flask` to see if it works or not. – Tuan Sep 01 '17 at 03:26
  • I think I know where the cause is. In my company environment, this type of thing is not allowed, "pip install -r requirements.txt", and that is why the process is broken. When I was trying it at home with my own MAC, everything went smoothly. I guess the first "hellow-world" type of example could be more generic, that more people can give a try. – user3595231 Sep 01 '17 at 04:42
  • You office proxy is causing the issue, there is no net available to the container and that is why it is not able to install packages – Tarun Lalwani Sep 01 '17 at 10:26

0 Answers0