FROM python:3.12.8-slim-bookworm ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 APP_HOST=0.0.0.0 APP_PORT=8080 RUN useradd --create-home --uid 10001 appuser WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir --disable-pip-version-check -r requirements.txt COPY server.py . COPY migrations ./migrations USER appuser EXPOSE 8080 CMD ["python","server.py"]