feat(claude-code): switch to official installer with volume persistence#2
Merged
Conversation
- `README.md`: Update docs to reflect official installer and automatic config persistence - `src/claude-code/devcontainer-feature.json`: Bump to 1.1.0, add named volume mount and postStartCommand, drop Node.js dependency - `src/claude-code/install.sh`: Replace npm install with official claude.ai installer, copy binary to /usr/local/bin, install link-claude-config script - `src/claude-code/link-claude-config.sh`: Add post-start script to symlink ~/.claude to /claude-config volume - `test/claude-code/install_claude_code_specific_version.sh`: Replace npm list version check with claude --version - `test/claude-code/test.sh`: Remove npm global package validation (no longer applicable)
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
claude.ai/install.shbinary installer, removing the Node.js dependency/claude-config) with apostStartCommandsymlink, replacing the manual bind-mount approach documented previously/usr/local/binso all container users can access it regardless of home directory permissionsChanges
Feature Definition
src/claude-code/devcontainer-feature.json: Bump to v1.1.0, dropinstallsAfter: node, add named volume mount at/claude-config, addpostStartCommandto runlink-claude-configon each startInstallation Script
src/claude-code/install.sh: Replace Node.js/npm installation withcurl-only official installer; copy binary from~/.local/binto/usr/local/bin; pre-create/claude-configwith correct ownership; installlink-claude-config.shto/usr/local/binsrc/claude-code/link-claude-config.sh: New post-start script that creates the~/.claude -> /claude-configsymlink for the active container userTests
test/claude-code/test.sh: Remove npm global package check (no longer relevant with binary install)test/claude-code/install_claude_code_specific_version.sh: Switch version detection fromnpm list -gtoclaude --versionoutput parsingDocumentation
README.md: Update Claude Code section to reflect official installer, document automatic persistence via named volume, remove manual bind-mount instructions and Node.js feature prerequisiteTest plan
devcontainer features test --features claude-code --base-image mcr.microsoft.com/devcontainers/base:ubuntu .claudeis accessible system-wide:which claude && claude --version~/.claudeis a symlink pointing to/claude-configclaude --versionreturns2.1.30Generated with awf commit workflow