-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 933 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (29 loc) · 933 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
36
37
38
39
FROM swipl:stable
# Install Python 3.12 and pip
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Verify both runtimes
RUN swipl --version && python3 --version
# Create non-root user
RUN groupadd -r euclid && useradd -r -g euclid -d /app -s /sbin/nologin euclid
WORKDIR /app
# Copy dependency files first (layer caching)
COPY pyproject.toml README.md LICENSE ./
COPY euclid_mcp/ euclid_mcp/
# Install Python package
RUN pip install --no-cache-dir --break-system-packages . && \
rm -rf /root/.cache
# Copy integrations (HTTP API)
COPY integrations/ integrations/
# Set ownership
RUN chown -R euclid:euclid /app
USER euclid
# Default: MCP stdio mode
# Override with: docker run euclid-mcp python3 integrations/euclid_api.py
CMD ["python3", "-m", "euclid_mcp"]