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