feat: switch Claude Code to native installer (self-updating)#69
Closed
itscooleric wants to merge 2 commits intomainfrom
Closed
feat: switch Claude Code to native installer (self-updating)#69itscooleric wants to merge 2 commits intomainfrom
itscooleric wants to merge 2 commits intomainfrom
Conversation
groupadd fails with exit 4 if the GID already exists. Fall back to renaming the existing group to 'clide' so the useradd step succeeds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the npm-installed Claude Code CLI with the official native installer (curl -fsSL https://claude.ai/install.sh | sh). This eliminates the auto-update permission error that occurred because the npm global prefix was owned by root while claude runs as clide. The native binary at ~/.local/bin/claude is self-updating — no more version pinning or container rebuilds needed to get new Claude releases. Node.js is retained for Codex CLI and entrypoint config scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9 tasks
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm install -g @anthropic-ai/claude-code@2.1.71with the official native installer (curl -fsSL https://claude.ai/install.sh | sh)~/.local/bin/claudeas theclideuser — fully writable, self-updating at runtimeWhat changes
npm install -g @anthropic-ai/claude-code@2.1.71(root-owned, update needs sudo)curl -fsSL https://claude.ai/install.sh | sh(user-owned, self-updating)/usr/lib/node_modules/.bin/claude/home/clide/.local/bin/claudeWhy this is safe
~/.local/bin/claude(the binary) is separate from~/.claude/(the config/data dir that gets symlinked to/workspace/.clide)~/.local/binbefore other entriesclaudeby name (lines 141/144 inclaude-entrypoint.sh) — resolves via PATH, no hardcoded pathTest plan
docker compose buildsucceeds (native installer runs during build)docker compose run --rm claude --versionshows latest Claude Code versiondocker compose run --rm shell→claude --versionworksclaude doctorreports no update issuesdocker compose up web) →claudelaunches correctly🤖 Generated with Claude Code