fix: use direct binary download for Claude Code instead of npm

npm install fails in CI due to native dependency compilation issues.
Download the pre-built binary directly from the official GCS distribution
bucket with SHA256 checksum verification. This approach worked previously
(run #135) and avoids npm entirely — Node.js is only needed for Happy Coder.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
DevContainer User
2026-02-25 19:20:46 +00:00
parent f689b27b78
commit c70352dc41
+14 -2
View File
@@ -61,13 +61,25 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \ apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Install Happy Coder and Claude Code globally via npm # Install Happy Coder globally via npm
RUN npm install -g happy-coder @anthropic-ai/claude-code RUN npm install -g happy-coder
# Cache-bust: tools below fetch "latest" at build time — a changing ARG # Cache-bust: tools below fetch "latest" at build time — a changing ARG
# forces Docker to re-run these layers instead of serving stale cache. # forces Docker to re-run these layers instead of serving stale cache.
ARG TOOLS_CACHEBUST=0 ARG TOOLS_CACHEBUST=0
# Install Claude Code native binary (direct download with checksum verification)
RUN CLAUDE_GCS="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases" && \
CLAUDE_VERSION=$(curl -fsSL "$CLAUDE_GCS/latest") && \
echo "Installing Claude Code ${CLAUDE_VERSION}..." && \
curl -fsSL "$CLAUDE_GCS/$CLAUDE_VERSION/manifest.json" -o /tmp/manifest.json && \
CHECKSUM=$(jq -r '.platforms["linux-x64"].checksum' /tmp/manifest.json) && \
curl -fsSL -o /usr/local/bin/claude "$CLAUDE_GCS/$CLAUDE_VERSION/linux-x64/claude" && \
echo "$CHECKSUM /usr/local/bin/claude" | sha256sum -c && \
chmod +x /usr/local/bin/claude && \
rm /tmp/manifest.json && \
claude --version
# Install OpenCode AI coding agent # Install OpenCode AI coding agent
RUN OPENCODE_VERSION=$(curl -sL https://api.github.com/repos/opencode-ai/opencode/releases/latest | jq -r '.tag_name') && \ RUN OPENCODE_VERSION=$(curl -sL https://api.github.com/repos/opencode-ai/opencode/releases/latest | jq -r '.tag_name') && \
curl -fsSL "https://github.com/opencode-ai/opencode/releases/download/${OPENCODE_VERSION}/opencode-linux-x86_64.tar.gz" | \ curl -fsSL "https://github.com/opencode-ai/opencode/releases/download/${OPENCODE_VERSION}/opencode-linux-x86_64.tar.gz" | \