FROM python:3.11-slim

WORKDIR /app
COPY requirements.txt .
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt

COPY . .
RUN --mount=type=cache,target=/root/.cache/pip pip install -e .

ENV AI_CORE_HOST=0.0.0.0
ENV AI_CORE_PORT=8000
ENV AI_CORE_BASE_URL=http://app:8080/api/v1
# Set AI_CORE_AUTH_TOKEN at runtime; HTTP transport refuses to start without it.

EXPOSE 8000

CMD ["ai-core-mcp-server", "--transport", "http", "--host", "0.0.0.0", "--port", "8000"]
