# Operator-tooling image — installs C11 + C12 + healthcheck.
# Per `_docs/02_document/deployment/containerization.md`.

FROM python:3.10-slim AS runtime
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
        ca-certificates \
        libpq5 \
        curl \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/gps-denied
COPY pyproject.toml ./
RUN pip install --no-cache-dir -e ".[dev]"

COPY src ./src
ENV PYTHONPATH="/opt/gps-denied/src"

HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
    CMD python3 -m gps_denied_onboard.healthcheck || exit 1

ENTRYPOINT ["python3", "-m", "gps_denied_onboard.runtime_root"]
