forked from opendatahub-io/rhoai-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.konflux
More file actions
49 lines (37 loc) · 1.78 KB
/
Copy pathDockerfile.konflux
File metadata and controls
49 lines (37 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Dockerfile.konflux — Konflux CI build for RHOAI MCP Server
# Adapted for AIPCC base images and Konflux build pipeline requirements.
ARG BASE_IMAGE=quay.io/aipcc/base-images/cpu-el9.8:3.6.0-ea.2-1788562451@sha256:5dbe6a3e14877ef9fbda55e6cef66430a244c6a5c73a9a72bfef5b3af31e44c5
FROM ${BASE_IMAGE}
# Labels for container metadata
LABEL org.opencontainers.image.title="RHOAI MCP Server"
LABEL org.opencontainers.image.description="MCP server for Red Hat OpenShift AI - enables AI agents to interact with RHOAI environments"
LABEL org.opencontainers.image.vendor="Red Hat"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/opendatahub-io/rhoai-mcp"
# Konflux labels
LABEL com.redhat.component="odh-rhoai-mcp"
LABEL name="odh-rhoai-mcp"
COPY --chown=1001:0 pyproject.toml README.md ./
COPY --chown=1001:0 src/ ./src/
RUN pip install --no-cache-dir .
# Environment variables with container-friendly defaults
# Transport: default to stdio for Claude Desktop compatibility
ENV RHOAI_MCP_TRANSPORT="stdio"
# HTTP binding: use 0.0.0.0 for container networking
ENV RHOAI_MCP_HOST="0.0.0.0"
ENV RHOAI_MCP_PORT="8000"
# Auth: default to auto-detection
ENV RHOAI_MCP_AUTH_MODE="auto"
# Logging: default to INFO
ENV RHOAI_MCP_LOG_LEVEL="INFO"
# Expose port for HTTP transports (SSE, streamable-http)
EXPOSE 8000
# Health check for HTTP transports
# Note: Only works with SSE/streamable-http, not stdio
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import httpx; httpx.get('http://localhost:8000/health', timeout=5)" || exit 0
USER 1001
# Default entrypoint runs the MCP server
ENTRYPOINT ["rhoai-mcp"]
# Default to stdio transport (can be overridden with --transport sse|streamable-http)
CMD ["--transport", "stdio"]