-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (22 loc) · 746 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (22 loc) · 746 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
34
35
# Stage 1: Builder
FROM python:3.13-slim AS builder
WORKDIR /app
COPY pyproject.toml requirements.txt ./
# Install Python dependencies (skip playwright — SSO runs on the host)
RUN pip install --no-cache-dir --target /app/deps \
$(grep -v playwright requirements.txt | tr '\n' ' ')
COPY src/ ./src/
# Stage 2: Runtime
FROM python:3.13-slim
WORKDIR /app
RUN groupadd --gid 1000 appuser && \
useradd --uid 1000 --gid appuser --create-home appuser
COPY --from=builder /app/deps /app/deps
COPY --from=builder /app/src ./src
COPY --from=builder /app/pyproject.toml ./
RUN chown -R appuser:appuser /app
USER appuser
ENV PYTHONPATH=/app/deps:$PYTHONPATH
EXPOSE 8765
ENV MCP_TRANSPORT=sse
ENTRYPOINT ["python3", "-m", "src.server"]