feat: migrate Claude Code installation from npm to native installer#37
Open
MaEscalanteHe wants to merge 6 commits into
Open
feat: migrate Claude Code installation from npm to native installer#37MaEscalanteHe wants to merge 6 commits into
MaEscalanteHe wants to merge 6 commits into
Conversation
Migrate from `npm install -g @anthropic-ai/claude-code` to the native installer at https://claude.ai/install.sh, removing the Node.js dependency entirely. - Remove Node.js install/detection functions - Add curl/bash dependency check - Add Alpine-specific deps (libgcc, libstdc++, ripgrep) - Copy binary to /usr/local/bin/ for multi-user access - Remove installsAfter Node.js dependency from feature metadata
- Remove node:1 feature from test scenarios - Remove node --version and npm --version checks
- Rewrite NOTES.md removing all Node.js references - Add Alpine Linux and deprecation notice sections - Remove Requirements section from README.md
|
@8enmann @chrislloyd Can you check this PR? Thank you |
milamer
reviewed
Mar 23, 2026
| install_claude_code() { | ||
| echo "Installing Claude Code CLI..." | ||
| npm install -g @anthropic-ai/claude-code | ||
| curl -fsSL https://claude.ai/install.sh | bash |
There was a problem hiding this comment.
Had problems with that. Changed it to
su - "$_REMOTE_USER" -c 'curl -fsSL https://claude.ai/install.sh | bash'to install it in the correct user
Author
There was a problem hiding this comment.
Done! Implemented the su - "$_REMOTE_USER" approach as you suggested, and updated the binary path resolution to look in the remote user's home instead of root's.
Kept the copy to /usr/local/bin so claude is available globally just in case, but if you'd rather keep it only for the remote user let me know and I'll remove it.
clamoriniere
added a commit
to DataDog/datadog-operator
that referenced
this pull request
Apr 9, 2026
To be able to use the last version of claud code, we need to use for now a customer feature release until this PR is merged anthropics/devcontainer-features#37
3 tasks
|
This PR is super on point, is there a blocker @milamer ? |
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-codewith the native installer (https://claude.ai/install.sh), removing the Node.js dependency entirelylibgcc,libstdc++,ripgrep)Motivation
The Claude Code CLI now provides a native installer that does not require Node.js. This simplifies the feature by removing the Node.js dependency, reducing container image size, and eliminating the complex Node.js auto-installation logic.
Test plan
devcontainer features test -f claude-code --skip-autogenerated --skip-duplicated .to verify scenario tests passdevcontainer features test --skip-scenarios -f claude-code -i ubuntu:latest .to verify autogenerated tests passclaude --versionworks inside a built container