title: Docker build problems with pip install -r requirements: Failed to establish a new connection: [Errno -2] Name or service not known
body: <p>I'm trying to Docker build a django app, but I get te following message when docker tries to pip install -r requirements:</p>
  
  <pre><code>Collecting Django==2.2.5 (from -r requirements.txt (line 1) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('&lt;pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff789506828&gt;: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/django/
  </code></pre>
  
  <p>There's my Dockerfile:</p>
  
  <pre><code>FROM python:3.6
  ENV PYTHONUNBUFFERED 1
  WORKDIR /app
  COPY . /app
  RUN pip install -r requirements.txt
  </code></pre>
  
  <p>My Linux distro:</p>
  
  <pre><code>Linux version 4.15.0-30deepin-generic (pbuilder@zs-PC) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #31 SMP Fri Nov 30 04:29:02 UTC 2018
  </code></pre>
  
  <p>Not only Django, but all requirements cannot be installed. I'm not using a Proxy</p>