mirror of
https://github.com/interfacerproject/zenflows-fabaccess.git
synced 2025-03-12 15:01:44 +01:00
This uses Python version 3.11 with Debian slim-bullseye (11). I tried for a quite while to build it on Alpine, but Zenroom bindings fail to work no matter what I do It uses Uvicorn that listens on TCP over IPv4 using port 8000. A process manager such as Gunicorn was excluded for simplicity and can be used separetely, or orchestration can be used instead.
19 lines
422 B
Docker
19 lines
422 B
Docker
ARG PYVER=3.11 DEBVER=slim-bullseye
|
|
|
|
|
|
FROM python:$PYVER-$DEBVER
|
|
WORKDIR /app
|
|
|
|
ARG USER=app
|
|
ARG GROUP=$USER
|
|
RUN addgroup --system "$GROUP" && adduser --system --ingroup "$GROUP" "$USER"
|
|
|
|
COPY --chown=$USER:$GROUP requirements.txt .
|
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
USER $USER:$GROUP
|
|
COPY --chown=$USER:$GROUP . .
|
|
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|