Updated dockerfile to use node24 and install claude from google cloud storage

This commit is contained in:
2026-03-16 22:42:56 +01:00
parent f806c8046c
commit 94fd1de8ea
2 changed files with 137 additions and 13 deletions

View File

@@ -1,24 +1,26 @@
FROM node:20-slim
FROM node:24-bookworm-slim
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
jq \
netcat-openbsd \
socat \
iputils-ping \
iproute2 \
dnsutils \
python3 \
git curl wget jq netcat-openbsd socat \
iputils-ping iproute2 dnsutils python3 \
unzip zstd procps lsof psmisc \
&& rm -rf /var/lib/apt/lists/*
ARG UID=1000
ARG GID=1000
RUN npm install -g @anthropic-ai/claude-code
RUN GCS="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases" \
&& VERSION=$(curl -fsSL "$GCS/latest") \
&& CHECKSUM=$(curl -fsSL "$GCS/$VERSION/manifest.json" | jq -r '.platforms["linux-x64"].checksum') \
&& curl -fsSL "$GCS/$VERSION/linux-x64/claude" -o /tmp/claude \
&& echo "$CHECKSUM /tmp/claude" | sha256sum -c \
&& mv /tmp/claude /usr/local/bin/claude \
&& chmod +x /usr/local/bin/claude
RUN groupmod -g $GID node && usermod -u $UID -g $GID -l claude node && usermod -d /home/claude -m claude
RUN (userdel node 2>/dev/null || true) \
&& (groupdel node 2>/dev/null || true) \
&& groupadd -g $GID claude \
&& useradd -u $UID -g $GID -m -s /bin/bash claude
USER claude
WORKDIR /workspace