Example under page https://docs.docker.com/get-started/part2/ to build using docker build -t friendlyhello . is not working..... please check.....
File: get-started/part2.md, CC @johndmulhausen
Example under page https://docs.docker.com/get-started/part2/ to build using docker build -t friendlyhello . is not working..... please check.....
logs----------------------------------- ls -lrt total 12 -rw-r--r--. 1 root root 12 Jul 20 14:41 requirements.txt -rw-r--r--. 1 root root 665 Jul 20 14:42 app.py -rw-r--r--. 1 root root 481 Jul 20 14:43 Dockerfile
docker build -t friendlyhello .
Sending build context to Docker daemon 4.608kB Step 1/7 : FROM python:2.7-slim ---> 4f57b96607d2 Step 2/7 : WORKDIR /app ---> Using cache ---> a945e1a7d8e0 Step 3/7 : ADD . /app ---> Using cache ---> aa617ecb2044 Step 4/7 : RUN pip install -r requirements.txt ---> Running in fb0a6673981b 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 0x7fb1bee43c50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /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 0x7fb1bee43810>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /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 0x7fb1bee43e90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /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 0x7fb1bee43f90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /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 0x7fb1bee43510>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /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 can't seem to reproduce this, and I have 2 theories on why this would fail for you:
- You have some typo on the
requirements.txtorDockerfile. Review these files, and check if you have any extra spaces or tabs - Docker wasn't able to run the instruction
pip install -r requirements.txtfor some reason. Maybe you're not connected to the internet?
Also can't repro; looks like you have a connection issue preventing pip from reaching the repo it needs to install the packages.
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked