Files
scha/Dockerfile
T
westfarn 898b1918ba
Unit Tests / test (push) Successful in 4s
Drop compromised eMudhra roots from outbound TLS trust (#36)
Outbound TLS in this image still trusted the compromised eMudhra roots (`emSign ECC Root CA - G3` and `Comodo AAA Services`).

- Image install now upgrades `ca-certificates` and regenerates the trust bundle.
- `certifi` is locked at 2026.10.23, which drops those roots for `requests` and `httpx`.

Merge this, then redeploy prod.

Reviewed-on: #36
2026-10-23 09:02:26 -07:00

30 lines
655 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
UV_PROJECT_ENVIRONMENT=/app/.venv
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libpq5 \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY scha ./scha
COPY schasite ./schasite
COPY manage.py ./
COPY scripts/docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8000
ENTRYPOINT ["/entrypoint.sh"]