title: django with docker dosen't see pillow
body: <p>I'm trying to deploy my project on django. I almost did it but django can't see installed pillow in docker container. I'm sure that it's installed pip sends me this:</p>
  <pre><code>sudo docker-compose -f docker-compose.prod.yml exec web pip install pillow
  
  Defaulting to user installation because normal site-packages is not writeable
  Requirement already satisfied: pillow in /usr/local/lib/python3.8/site-packages (8.1.0)
  </code></pre>
  <p>But when i'm trying to migrate db i see this:</p>
  <pre><code>ERRORS:
  history_main.Exhibit.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
      HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command &quot;python -m pip install 
  Pillow&quot;.
  history_main.MainUser.avatar: (fields.E210) Cannot use ImageField because Pillow is not installed.
  </code></pre>
  <p>Here are parts of Dockerfile where Pillow tries to install:</p>
  <pre><code>RUN apk update \
      &amp;&amp; apk add postgresql-dev gcc python3-dev musl-dev jpeg-dev zlib-dev build-base 
  RUN pip install --upgrade pip
  COPY ./req.txt .
  RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r req.txt
  </code></pre>
  <p>...</p>
  <pre><code>RUN apk update &amp;&amp; apk add libpq
  COPY --from=builder /usr/src/app/wheels /wheels
  COPY --from=builder /usr/src/app/req.txt .
  RUN pip install --no-cache /wheels/*
  </code></pre>
  <p>docker-compose:</p>
  <pre><code>version: '3.7'
  
  services:
    web:
      build:
        context: ./app
        dockerfile: Dockerfile.prod
      command: gunicorn hello_django.wsgi:application --bind 0.0.0.0:8000
      volumes:
        - static_volume:/home/app/web/staticfiles
        - media_volume:/home/app/web/mediafiles
      expose:
        - 8000
      env_file:
        - ./.env.prod
      depends_on:
        - db
    db:
      image: postgres:12.0-alpine
      volumes:
        - postgres_data:/var/lib/postgresql/data/
      env_file:
        - ./.env.prod.db
    nginx:
      build: ./nginx
      volumes:
        - static_volume:/home/app/web/staticfiles
        - media_volume:/home/app/web/mediafiles
      ports:
        - 1337:80
      depends_on:
        - web
    volumes:
     postgres_data:
     static_volume:
     media_volume:
  </code></pre>
  <p>dockerfile for web:</p>
  <pre><code>###########
  # BUILDER #
  ###########
  
  # pull official base image
  FROM python:3.8.3-alpine as builder
  
  # set work directory
  WORKDIR /usr/src/app
  
  # set environment variables
  ENV PYTHONDONTWRITEBYTECODE 1
  ENV PYTHONUNBUFFERED 1
  
  # install psycopg2 dependencies
  RUN apk update \
      &amp;&amp; apk add postgresql-dev gcc python3-dev musl-dev
  
  # lint
  RUN pip install --upgrade pip
  RUN pip install flake8
  COPY . .
  RUN flake8 --ignore=E501,F401 .
  
  # install dependencies
  COPY ./req.txt .
  RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r req.txt
  
  
  #########
  # FINAL #
  #########
  
  # pull official base image
  FROM python:3.8.3-alpine
  
  # create directory for the app user
  RUN mkdir -p /home/app
  
  # create the app user
  RUN addgroup -S app &amp;&amp; adduser -S app -G app
  
  # create the appropriate directories
  ENV HOME=/home/app
  ENV APP_HOME=/home/app/web
  RUN mkdir $APP_HOME
  WORKDIR $APP_HOME
  
  # install dependencies
  RUN apk update &amp;&amp; apk add libpq
  COPY --from=builder /usr/src/app/wheels /wheels
  COPY --from=builder /usr/src/app/req.txt .
  RUN pip install --no-cache /wheels/*
  
  # copy entrypoint-prod.sh
  COPY ./entrypoint.prod.sh $APP_HOME
  
  # copy project
  COPY . $APP_HOME
  
  # chown all the files to the app user
  RUN chown -R app:app $APP_HOME
  
  # change to the app user
  USER app
  
  # run entrypoint.prod.sh
  ENTRYPOINT [&quot;/home/app/web/entrypoint.prod.sh&quot;]
  </code></pre>