title: Docker so slow while installing pip requirements
body: <p>I am trying to implement a docker for a dummy local Django project. I am using <code>docker-compose</code> as a tool for defining and running multiple containers. Here I tried to containerize the <code>Django-web-app</code> and <code>PostgreSQL</code> two services.  </p>
  
  <p><em>Configuration used in <code>Dockerfile</code> and <code>docker-compose.yml</code></em>  </p>
  
  <p><strong>Dockerfile</strong></p>
  
  <pre><code># Pull base image
  FROM python:3.7-alpine
  
  # Set environment variables
  ENV PYTHONDONTWRITEBYTECODE 1
  ENV PYTHONUNBUFFERED 1
  
  # Set work directory
  WORKDIR /code
  
  # Install dependencies
  COPY requirements.txt /code/
  RUN pip install -r requirements.txt
  
  # Copy project
  COPY . /code/
  </code></pre>
  
  <p><strong>docker-compose.yml</strong></p>
  
  <pre><code>version: '3.7'
  
  services:
      web:
          build: .
          command: python manage.py runserver 0.0.0.0:8000
          volumes: 
              - .:/code
          ports:
              - "8000:8000"
          depends_on:
              - db
      db:
          image: postgres:11
          volumes:
              - postgres_data:/var/lib/postgresql/data/
  volumes:
      postgres_data:
  
  </code></pre>
  
  <p>All seems okay. The path postgres integrations and all except one thing <code>pip install -r requirements.txt</code>. This is taking too much time to install from requirements. Last time I was giving up on this but at last the installation does completed but takes lots of time to complete.  </p>
  
  <p>In my scenario, the only issue is why the <code>pip install</code>  so slow. If there is anything that I am missing? I am new to docker and any help on this topic will be highly appreciated. Thank you.  </p>
  
  <p>I was following this <a href="https://docs.docker.com/compose/django/" rel="noreferrer">Link</a>.</p>