feat: disable Claude Code auto-updater by default
Auto-updater doesn't work inside Docker and produces annoying errors. Seed ~/.claude/settings.json with DISABLE_AUTOUPDATER=1 via /etc/skel (new PVCs) and init-repo.sh (existing PVCs). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,10 @@ RUN curl -fsSL https://claude.ai/install.sh | bash && \
|
||||
rm -rf /root/.local/bin/claude && \
|
||||
claude --version
|
||||
|
||||
# Disable Claude Code auto-updater (doesn't work inside Docker)
|
||||
RUN mkdir -p /etc/skel/.claude && \
|
||||
echo '{"env":{"DISABLE_AUTOUPDATER":"1"}}' > /etc/skel/.claude/settings.json
|
||||
|
||||
# Install OpenCode AI coding agent
|
||||
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" | \
|
||||
|
||||
@@ -104,6 +104,12 @@ chown -R "$RUN_UID:$RUN_GID" "$WORKSPACE_DIR"
|
||||
mkdir -p "$HOME"
|
||||
chown "$RUN_UID:$RUN_GID" "$HOME"
|
||||
|
||||
# Seed Claude Code settings if missing (disable auto-updater in Docker)
|
||||
if [ ! -f "$HOME/.claude/settings.json" ]; then
|
||||
mkdir -p "$HOME/.claude"
|
||||
echo '{"env":{"DISABLE_AUTOUPDATER":"1"}}' > "$HOME/.claude/settings.json"
|
||||
chown -R "$RUN_UID:$RUN_GID" "$HOME/.claude"
|
||||
fi
|
||||
|
||||
# Export workspace directory for startapp.sh
|
||||
echo "$WORKSPACE_DIR" > /tmp/workspace-dir
|
||||
|
||||
Reference in New Issue
Block a user