From f6cbec05f6aa36105999b6bbc3aeb3b418280c29 Mon Sep 17 00:00:00 2001 From: DevContainer User Date: Sat, 28 Feb 2026 15:27:10 +0000 Subject: [PATCH] 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 --- Dockerfile | 4 ++++ scripts/init-repo.sh | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 332aac4..7d995a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" | \ diff --git a/scripts/init-repo.sh b/scripts/init-repo.sh index 077e920..9842614 100644 --- a/scripts/init-repo.sh +++ b/scripts/init-repo.sh @@ -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