FROM python:3.13.18-slim-bookworm ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONPATH=/app/src WORKDIR /app COPY requirements.txt requirements-dev.txt requirements.lock ./ RUN python -m pip install --no-cache-dir --upgrade pip==26.2.0 && pip install --no-cache-dir -r requirements.lock -r requirements.txt && useradd --uid 10001 --create-home messenger RUN python -m pip uninstall --yes pip setuptools && rm -rf /usr/local/lib/python3.13/ensurepip COPY src/ src/ COPY migrations/ migrations/ COPY student-tests/ student-tests/ COPY scripts/ scripts/ COPY tests/ tests/ COPY contracts/ contracts/ COPY lab.json Makefile README.md COURSE.md CONTRIBUTING.md REPORT.md ./ ARG APP_RELEASE=lab7-v1 ENV APP_RELEASE=${APP_RELEASE} LABEL org.opencontainers.image.version=${APP_RELEASE} USER messenger EXPOSE 8080 CMD ["uvicorn", "messenger.app:create_app", "--factory", "--host", "0.0.0.0", "--port", "8080", "--timeout-graceful-shutdown", "5", "--no-access-log"]