Installs the Claude Code CLI (and, in VS Code, the Claude Code extension).
"features": {
"ghcr.io/marmelab/devcontainers/claude-code:1": {}
}| Options Id | Description | Type | Default Value |
|---|---|---|---|
| version | Version passed to the official installer: 'latest', 'stable', or a specific version such as '1.0.0'. | string | latest |
- Downloads and runs the official installer from
https://claude.ai/install.shas the container user. - Symlinks the CLI into
/usr/local/binso it is onPATHin login, non-interactive, and CI shells, and adds$HOME/.local/binto~/.bashrcand~/.zshrcfor interactive shells. - In VS Code, installs the
Anthropic.claude-codeextension.
Installs curl and CA certificates first if they are missing (Debian/Ubuntu bases).
The feature does not mount credentials, because bind mounts are host-specific and
belong in the consuming devcontainer.json. To authenticate Claude Code inside the
container from your host setup, add the mounts yourself:
Replace <user> with your container user (for example node or vscode). The host
~/.claude.json file and ~/.claude directory must already exist, otherwise the bind
mount fails the container build.
{ "features": { "ghcr.io/marmelab/devcontainers/claude-code:1": {}, }, "mounts": [ { "type": "bind", "source": "${localEnv:HOME}/.claude.json", "target": "/home/<user>/.claude.json", }, { "type": "bind", "source": "${localEnv:HOME}/.claude", "target": "/home/<user>/.claude", }, ], }