FROM python:3.8

RUN pip install --upgrade pip

COPY requirements.txt requirements-dev.txt ./
RUN pip install -r requirements-dev.txt

RUN useradd -ms /bin/bash python

RUN mkdir -p /home/python/app && chown python:python /home/python/app

WORKDIR /home/python/app

USER python

COPY . .

CMD python -m pytest -p no:cacheprovider tests/ --durations=5
