FROM 475275892927.dkr.ecr.us-east-1.amazonaws.com/python:3.7-aws2

ARG REVISION
ARG BUILDTIME
ARG VERSION
LABEL REVISION=${REVISION}
LABEL BUILDTIME=${BUILDTIME}

COPY tests /app/tests
COPY entrypoint.sh /app/entrypoint.sh
COPY pip.conf /app/pip.conf
COPY requirements/test.pip /app/requirements/test.pip

ENV PIP_CONFIG_FILE=/app/pip.conf

WORKDIR /app

RUN pip3 install -U pip --user && \
  pip3 install -r /app/requirements/test.pip --user

ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]
