-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 839 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 839 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
31
32
33
FROM python:3.12-slim
LABEL maintainer="Sutian Kaewdee"
LABEL version="1.0.0"
LABEL description="Secure MCP server for Proxmox VE management"
WORKDIR /app
# Install curl for healthcheck (minimal footprint)
RUN apt-get update && \
apt-get install -y --no-install-recommends curl python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create non-root user for security
RUN useradd -m -u 1000 -s /bin/bash mcp && \
mkdir -p /app && \
chown -R mcp:mcp /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --break-system-packages -r requirements.txt
# Copy application files
COPY --chown=mcp:mcp src/ ./src/
COPY --chown=mcp:mcp config/ ./config/
# Switch to non-root user
USER mcp
EXPOSE 8000
CMD ["uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "8000"]