Skip to content

Latest commit

 

History

History

claude-code

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Claude Code (claude-code)

Installs the Claude Code CLI (and, in VS Code, the Claude Code extension).

Example Usage

"features": {
    "ghcr.io/marmelab/devcontainers/claude-code:1": {}
}

Options

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

What it does

  • Downloads and runs the official installer from https://claude.ai/install.sh as the container user.
  • Symlinks the CLI into /usr/local/bin so it is on PATH in login, non-interactive, and CI shells, and adds $HOME/.local/bin to ~/.bashrc and ~/.zshrc for interactive shells.
  • In VS Code, installs the Anthropic.claude-code extension.

Installs curl and CA certificates first if they are missing (Debian/Ubuntu bases).

Using your Claude credentials

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:

{
  "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",
    },
  ],
}

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.