0

I am following this tutorial, https://docs.docker.com/get-started/part2/#build-the-app.

At the part I need to run this, docker build -t friendlyhello ., I ran sudo docker build -t friendlyhello . instead because I have not yet setup proper group and user specifically for Docker.

My setup stuck at this part...

Step 4/7 : RUN pip install -r requirements.txt
 ---> Running in 74c38677ecc3
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 0x7fee6c92d150>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/flask/

I don't think firewall or ISP are the problem since I can access Flask directly with sudo pip install flask directly from my host Ubuntu 16.04.

What is the solution to this problem?

davidism
  • 121,510
  • 29
  • 395
  • 339
notalentgeek
  • 4,939
  • 11
  • 34
  • 53

1 Answers1

0

Okay it is is suddenly work.

I was at my local library and as I mentioned before sudo pip install flask ran fine. However, the from Docker, it returned the error I mentioned here. I tried to shutdown/restart it was still the same.

Then I just came back home and run the same command (from fully shutdown Ubuntu 16.04 machine) and it just work.

I did nothing from what the link @misraX gave me. It is all default fresh installation setup from Docker.

notalentgeek
  • 4,939
  • 11
  • 34
  • 53