-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 837 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (22 loc) · 837 Bytes
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
FROM python:3.12-slim AS base
LABEL maintainer="hrco"
LABEL description="xBridge MCP - xAI Grok API tools for Model Context Protocol"
LABEL version="3.0.0"
LABEL io.modelcontextprotocol.server.name="io.github.hrco/xbridge-mcp"
WORKDIR /app
# Install dependencies first (cache layer)
COPY pyproject.toml .
RUN pip install --no-cache-dir mcp>=1.0.0 httpx>=0.27.0
# Copy application code
COPY README.md pyproject.toml ./
COPY xbridge_mcp/ ./xbridge_mcp/
COPY run_server.py .
# Install package
RUN pip install --no-cache-dir -e .
# Health check: verify the package imports correctly
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "from xbridge_mcp.server import server; print('ok')" || exit 1
# MCP servers communicate via stdio
ENV PYTHONUNBUFFERED=1
# Run the server
CMD ["xbridge-mcp"]