FROM python:3.7-buster # Run project binaries from the user's local bin folder ENV PATH=/home/newsreader/.local/bin:$PATH # Set the default shell RUN useradd -ms /bin/bash newsreader RUN mkdir /app WORKDIR /app RUN chown newsreader:newsreader /app USER newsreader # Use a seperate layer for the project requirements COPY requirements /app/requirements RUN pip install --user -r requirements/dev.txt COPY . /app/