📑

Claude CodeのDev Container Featureが出てた

に公開

知らん間にAnthropicから公式のDev Container Featuresが出ていた。
https://github.com/anthropics/devcontainer-features

devcontainer.json に以下のように記述することでDev ContainerにClaude Codeをセットアップすることができる。

"features": {
    "ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {}
}

普段からDev Container上でClaude Codeを利用しているので、本当にありがたい。もう... postCreateCommandnpm install -g する必要は...ないんやなって...。

ちなみにCLIのアップデートには sudo が必要だったので、気になる場合は他の方法を検討した方がいいかもしれない。

@vscode ➜ /workspaces $ claude update
Current version: 1.0.9
Checking for updates...
New version available: 1.0.11 (current: 1.0.9)
Installing update...
Using global installation update method...
Error: Insufficient permissions to install update
Try running with sudo or fix npm permissions
Or consider migrating to a local installation with:
  /migrate-installer

@vscode ➜ /workspaces $ sudo claude update
Current version: 1.0.9
Checking for updates...
New version available: 1.0.11 (current: 1.0.9)
Installing update...
Using global installation update method...
Successfully updated from 1.0.9 to version 1.0.11

Discussion