mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
fix(containerd): add pid:host for CNI netns access and runtime deps to MCP image
- Add pid: host to containerd service so server can access MCP container network namespaces via /proc/PID/ns/net for CNI setup - Add Node.js, npm, Python 3, uv to embedded MCP image rootfs so users can run npx/uvx MCP servers inside containers
This commit is contained in:
@@ -44,6 +44,7 @@ services:
|
|||||||
dockerfile: docker/Dockerfile.containerd
|
dockerfile: docker/Dockerfile.containerd
|
||||||
container_name: memoh-containerd
|
container_name: memoh-containerd
|
||||||
privileged: true
|
privileged: true
|
||||||
|
pid: host
|
||||||
volumes:
|
volumes:
|
||||||
- containerd_sock:/run/containerd
|
- containerd_sock:/run/containerd
|
||||||
- containerd_data:/var/lib/containerd
|
- containerd_data:/var/lib/containerd
|
||||||
|
|||||||
@@ -24,7 +24,18 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
|||||||
# ---- Stage 2: Assemble MCP image rootfs ----
|
# ---- Stage 2: Assemble MCP image rootfs ----
|
||||||
FROM alpine:latest AS mcp-rootfs
|
FROM alpine:latest AS mcp-rootfs
|
||||||
|
|
||||||
RUN apk add --no-cache grep
|
# Base utilities
|
||||||
|
RUN apk add --no-cache grep curl bash
|
||||||
|
|
||||||
|
# Node.js + npm (provides npx for JS/TS MCP servers)
|
||||||
|
RUN apk add --no-cache nodejs npm
|
||||||
|
|
||||||
|
# Python 3 + uv (provides uvx for Python MCP servers)
|
||||||
|
RUN apk add --no-cache python3 && \
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
||||||
|
ln -sf /root/.local/bin/uv /usr/local/bin/uv && \
|
||||||
|
ln -sf /root/.local/bin/uvx /usr/local/bin/uvx
|
||||||
|
|
||||||
COPY --from=mcp-builder /out/mcp /opt/mcp
|
COPY --from=mcp-builder /out/mcp /opt/mcp
|
||||||
COPY cmd/mcp/template /opt/mcp-template
|
COPY cmd/mcp/template /opt/mcp-template
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user