Skip to content

feat: install Claude Code CLI via pinned native installer instead of the devcontainer feature - #10

Merged
andykenward merged 1 commit into
mainfrom
change-claude-install
Jul 24, 2026
Merged

feat: install Claude Code CLI via pinned native installer instead of the devcontainer feature#10
andykenward merged 1 commit into
mainfrom
change-claude-install

Conversation

@andykenward

@andykenward andykenward commented Jul 24, 2026

Copy link
Copy Markdown
Owner

feat: migrate Claude Code installation from npm to native installer

What

Replaces the ghcr.io/anthropics/devcontainer-features/claude-code dev container Feature with a pinned install of the Claude Code CLI directly in the node template's Dockerfile.

Why

Applying the template surfaced @undefined in VS Code's Feature trust/review prompt. Root cause: the external claude-code Feature declares installsAfter: ["ghcr.io/devcontainers/features/node"] with no version tag, so the extension renders that ordering reference as …/node@undefined. It's cosmetic (the node Feature isn't actually installed — this template gets Node from the digest-pinned base image), but there's no way to fix it from our config while the Feature is in use.

Dropping the Feature removes the installsAfter reference entirely, so the @undefined disappears.

How

  • Dockerfile: install Claude Code via Anthropic's official native installer, pinned to a specific version through the installer's [stable|latest|VERSION] argument (ARG CLAUDE_CODE_VERSION=2.1.218). Runs as node (the installer refuses sudo and installs into ~/.local), with ~/.local/bin on PATH. No npm dependency and no unpinned curl | bash @latest — the version is fixed here and frozen at runtime by DISABLE_AUTOUPDATER=1. Annotated for Renovate (npm datasource on @anthropic-ai/claude-code).
  • devcontainer.json: removed the features block; added anthropic.claude-code to extensions (previously supplied by the Feature's customizations).
  • devcontainer-template.json / NOTES.md: reworded "Claude Code feature" → native, version-pinned CLI install.
  • test/node/test.sh: added a check "claude" claude --version smoke assertion.

README.md is intentionally untouched — the update-documentation workflow regenerates it from the manifest + NOTES.md.

Notes for review

  • The curl … | bash -s <version> line does fetch the installer over the network (pinned version, not pinned script). This is a deliberate tradeoff vs. the repo's usual full-provenance stance — the installed version is pinned, but the installer script itself is served from claude.ai.
  • Renovate auto-bumping of CLAUDE_CODE_VERSION depends on the shared andykenward/renovate-config preset recognizing the inline # renovate: annotation; a matcher may need adding there.

🤖 Generated with Claude Code

@andykenward
andykenward merged commit e9d1898 into main Jul 24, 2026
2 checks passed
@andykenward
andykenward deleted the change-claude-install branch July 24, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant