ARG BUILDTAG=build
FROM slack:${BUILDTAG}

COPY slack_server/tests slacker_server/tests

RUN curl -sSL https://install.python-poetry.org | python3 -

# copy project requirement files here to ensure they will be cached.
WORKDIR $PYSETUP_PATH
COPY poetry.lock pyproject.toml ./

# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
RUN /opt/poetry/bin/poetry install --no-dev
