FROM 475275892927.dkr.ecr.us-east-1.amazonaws.com/apollo/ui-test-selinoid-runner:master as main

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

USER root

# Copy pip configs for private repo
RUN mkdir -p /root/.config/pip/
COPY configs/pip.conf /root/.config/pip/
COPY configs/.pypirc /root/

WORKDIR /app

# Copy requirements
COPY ./requirements ./requirements

RUN pip install --upgrade pip setuptools \
    && pip install --trusted-host pypi.python.org -r ./requirements/base-internal.txt

ADD . /app

FROM main as dev

RUN pip install --trusted-host pypi.python.org -r ./requirements/dev.txt
