canaille-globuzma/demo/Dockerfile-canaille
Éloi Rivard 8f3ea59a70
fix: do not install '--all-extras' by default in the demo env
since it may require to compile dependencies for the mariadb backend for
instance.
2024-11-13 10:18:07 +01:00

27 lines
907 B
Text

FROM python:slim
RUN \
apt update && \
apt -y upgrade && \
apt install -y \
gcc \
libsasl2-dev \
libldap2-dev \
libssl-dev \
curl
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Needed until zxcvbn supports Python 3.13
# https://github.com/fief-dev/zxcvbn-rs-py/issues/2
ENV PYO3_USE_ABI3_FORWARD_COMPATIBILITY="1"
COPY uv.lock pyproject.toml hatch_build.py LICENSE.rst README.md demo/demoapp.py /opt/canaille/
COPY canaille /opt/canaille/canaille
RUN pip install uv
WORKDIR /opt/canaille
RUN uv sync --group demo --extra front --extra oidc --extra ldap --extra sqlite
ENTRYPOINT ["uv", "run", "flask", "run", "--host=0.0.0.0", "--extra-files", "/opt/canaille/conf/canaille-memory.toml", "--extra-files", "/opt/canaille/conf/canaille-ldap.toml", "--extra-files", "/opt/canaille/conf/canaille-sql.toml"]