FROM python:slim

RUN \
    apt update && \
    apt -y upgrade && \
    apt install -y \
    gcc \
    libsasl2-dev \
    libldap2-dev \
    libssl-dev

COPY poetry.lock pyproject.toml /opt/canaille/
RUN pip install poetry
WORKDIR /opt/canaille
RUN poetry install --only demo

ENTRYPOINT ["poetry", "run", "flask", "run", "--host=0.0.0.0"]
