15 lines
575 B
Docker
15 lines
575 B
Docker
FROM python:3.12.11-slim-bookworm
|
|
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
WORKDIR /app
|
|
RUN groupadd -g 10001 app && useradd -u 10001 -g 10001 -M -s /usr/sbin/nologin app
|
|
COPY requirements.txt ./requirements.txt
|
|
RUN python -m pip install --no-cache-dir -r requirements.txt
|
|
COPY src ./src
|
|
COPY migrations ./migrations
|
|
COPY scripts ./scripts
|
|
USER 10001:10001
|
|
EXPOSE 8443
|
|
STOPSIGNAL SIGTERM
|
|
# No secret, key or certificate is baked into the image: they are mounted at run time (/run/pki, /run/approle).
|
|
CMD ["python", "-m", "src.server"]
|