|
// .devcontainer/devcontainer.json |
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
|
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node |
|
{ |
|
"name": "Node 22 (bookworm) + Claude Code", |
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
|
"image": "mcr.microsoft.com/devcontainers/javascript-node:24-bullseye", |
|
|
|
// Features to add to the dev container. More info: https://containers.dev/features. |
|
"features": { |
|
// "ghcr.io/devcontainers/features/common-utils:2": { |
|
// "installZsh": true, |
|
// "configureZshAsDefaultShell": true, |
|
// "upgradePackages": true, |
|
// "username": "node" |
|
// }, |
|
"ghcr.io/devcontainers/features/github-cli:1": {}, |
|
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, |
|
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {}, |
|
// "ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": {}, |
|
"ghcr.io/devcontainers-extra/features/bash-command:1": { |
|
"command": "npm install -g typescript-language-server typescript" |
|
} |
|
}, |
|
|
|
// Configure tool-specific properties. |
|
"customizations": { |
|
// Configure properties specific to VS Code. |
|
"vscode": { |
|
"settings": { |
|
"terminal.integrated.defaultProfile.linux": "zsh" |
|
}, |
|
"extensions": [ |
|
"streetsidesoftware.code-spell-checker", |
|
"anthropic.claude-code", |
|
"dbaeumer.vscode-eslint", |
|
"redhat.vscode-yaml", |
|
"redhat.vscode-xml", |
|
"redhat.vscode-json" |
|
] |
|
} |
|
}, |
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally. |
|
"forwardPorts": [3000, 8080], |
|
|
|
// Use 'portsAttributes' to set default properties for specific forwarded ports. |
|
// More info: https://containers.dev/implementors/json_reference/#port-attributes |
|
"portsAttributes": { |
|
"3000": { |
|
"label": "Dev Server", |
|
"onAutoForward": "notify" |
|
} |
|
}, |
|
|
|
// -- Environment variables -- |
|
"containerEnv": { |
|
"NODE_ENV": "development" |
|
}, |
|
"remoteEnv": { |
|
// if anthropic api key is set, will skip login |
|
"ANTHROPIC_API_KEY": "${localEnv:ANTHROPIC_API_KEY}" |
|
}, |
|
|
|
// Use 'postCreateCommand' to run commands after the container is created. |
|
"postCreateCommand":{ |
|
// "install-codemap": "sudo brew tap JordanCoin/tap && sudo brew install codemap", |
|
"install-deps": "npm install" |
|
}, |
|
// -- Run configuration script on every container start -- |
|
"postStartCommand": "if [ -f .devcontainer/configure-claude.sh ]; then bash .devcontainer/configure-claude.sh; fi", |
|
|
|
"remoteUser": "node" |
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
|
// "remoteUser": "root" |
|
} |