STDIO servers with packageName (e.g. @leval/mcp-grafana) need a Node.js container that runs `npx -y <package>`. Previously, packageName was used as a Docker image reference causing "invalid reference format" errors. - Add Dockerfile.node-runner: minimal node:20-alpine with npx entrypoint - Update instance.service.ts: detect npm-based servers and use node-runner image with npx command instead of treating packageName as image name - Fix NanoCPUs: only set when explicitly provided (kernel CFS not available on all hosts) - Add mcp-servers network with explicit name for container isolation - Configure MCPD_NODE_RUNNER_IMAGE and MCPD_MCP_NETWORK env vars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
349 B
Docker
13 lines
349 B
Docker
# Base container for npm-based MCP servers (STDIO transport).
|
|
# mcpd uses this image to run `npx -y <packageName>` when a server
|
|
# has packageName but no dockerImage.
|
|
FROM node:20-alpine
|
|
|
|
WORKDIR /mcp
|
|
|
|
# Pre-warm npx cache directory
|
|
RUN mkdir -p /root/.npm
|
|
|
|
# Default entrypoint — overridden by mcpd via container command
|
|
ENTRYPOINT ["npx", "-y"]
|