# ShipCheck MCP server — Cloud Run image.
# Exposes the streamable-HTTP MCP transport at /mcp plus a /health probe.
#
# Build:   docker build -t shipcheck-mcp .
# Run:     docker run -p 8080:8080 -e PORT=8080 shipcheck-mcp
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1 \
    PORT=8080

WORKDIR /app

# git is required by the git-diff intelligence feature.
RUN apt-get update \
    && apt-get install -y --no-install-recommends git \
    && rm -rf /var/lib/apt/lists/*

COPY . /app

RUN pip install --no-cache-dir '.[mcp,playwright,database]' \
    && playwright install --with-deps chromium

EXPOSE 8080

# Container runs as root: playwright launches Chromium with --no-sandbox.
CMD ["shipcheck-mcp-http"]
