forked from LukasNespor/dataverse-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 660 Bytes
/
Dockerfile
File metadata and controls
27 lines (18 loc) · 660 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
FROM python:3.12-slim
# Create non-root user for security
RUN groupadd -r mcpuser && useradd -r -g mcpuser -d /app mcpuser
WORKDIR /app
# Install dependencies first (better layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source
COPY --chown=mcpuser:mcpuser src/ ./src/
# Create the token cache directory with correct ownership
RUN mkdir -p /data && chown mcpuser:mcpuser /data
USER mcpuser
# /data is a volume mount point for persistent token cache
VOLUME ["/data"]
ENV PYTHONPATH=/app/src
ENV PYTHONUNBUFFERED=1
# Run the MCP server via stdio (default FastMCP transport)
CMD ["python", "src/main.py"]