Skip to content

Commit d75ae90

Browse files
CopilotBukeLy
andcommitted
Update Dockerfile to install Node.js 20+ from NodeSource for MCP compatibility
Co-authored-by: BukeLy <19304666+BukeLy@users.noreply.github.com>
1 parent 729250d commit d75ae90

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

agent-sdk-server/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ WORKDIR ${LAMBDA_TASK_ROOT}
77
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
88
RUN ln -s /usr/local/bin/uv /usr/local/bin/uvx
99

10-
# Install Claude Code CLI (npm package, requires nodejs)
11-
# hadolint ignore=DL3016,DL3041
12-
RUN dnf install -y nodejs npm && \
10+
# Install Node.js 20+ (required for MCP's undici dependency)
11+
# hadolint ignore=DL3016,DL3041,DL4006
12+
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
13+
dnf install -y nodejs && \
1314
dnf clean all && \
1415
npm install -g @anthropic-ai/claude-code
1516

17+
# Fix npm cache permissions for Lambda
18+
RUN mkdir -p /tmp/.npm && chmod -R 777 /tmp/.npm
19+
ENV npm_config_cache=/tmp/.npm
20+
1621
# Install Python dependencies
1722
RUN uv pip install --system boto3 claude-agent-sdk
1823

0 commit comments

Comments
 (0)