forked from shivasurya/code-pathfinder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.mcp
More file actions
49 lines (35 loc) · 1.77 KB
/
Copy pathDockerfile.mcp
File metadata and controls
49 lines (35 loc) · 1.77 KB
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
40
41
42
43
44
45
46
47
48
49
# Dockerfile.mcp - Docker MCP Catalog image for code-pathfinder
# Downloads pre-built release binary instead of compiling from source.
# For scan/CI mode, use the main Dockerfile instead.
FROM debian:bookworm-slim@sha256:f06537653ac770703bc45b4b113475bd402f451e85223f0f2837acbf89ab020a
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG TARGETARCH
ARG VERSION=2.0.1
WORKDIR /app
# Install Python 3, pip, and curl
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python DSL library for rule execution
RUN pip install --no-cache-dir --break-system-packages codepathfinder
# Download pre-built pathfinder binary from GitHub release
RUN curl -fsSL "https://github.com/shivasurya/code-pathfinder/releases/download/v${VERSION}/pathfinder-linux-${TARGETARCH}.tar.gz" \
| tar -xz -C /usr/bin/ \
&& chmod +x /usr/bin/pathfinder
# Create non-root user with home directory
RUN groupadd -r pathfinder && useradd -r -g pathfinder -d /home/pathfinder -m -s /sbin/nologin pathfinder
# Create default project mount point for Docker MCP Gateway
RUN mkdir -p /project && chown pathfinder:pathfinder /project
USER pathfinder
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD ["/usr/bin/pathfinder", "version"]
LABEL maintainer="shiva@shivasurya.me"
LABEL io.modelcontextprotocol.server.name="dev.codepathfinder/pathfinder"
# Disable in-product update notices for Docker users — they upgrade by
# pulling a new image tag, so an in-container nudge would be noise.
ENV PATHFINDER_NO_UPDATE_CHECK=1
# MCP serve mode: stdio transport, indexing the mounted /project directory
# To disable analytics, add --disable-metrics flag
ENTRYPOINT ["/usr/bin/pathfinder", "serve", "--project", "/project"]