mirror of
https://github.com/trailofbits/claude-code-devcontainer
synced 2026-06-21 14:11:48 +00:00
3f06ce6873
- Use COPY from ghcr.io/astral-sh/uv:latest instead of curl install - Fix gitconfig bug when host config is mounted read-only - Add global gitignore for common patterns (.claude/, .DS_Store, etc.) - Use GIT_CONFIG_GLOBAL env var for container-local git settings - Add Security Model section to README explaining sandbox boundaries - Change postCreateCommand to use uv run Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
60 lines
1.8 KiB
JSON
60 lines
1.8 KiB
JSON
{
|
|
"name": "Claude Code Sandbox",
|
|
"build": {
|
|
"dockerfile": "Dockerfile",
|
|
"args": {
|
|
"TZ": "${localEnv:TZ:America/New_York}",
|
|
"CLAUDE_CODE_VERSION": "latest",
|
|
"GIT_DELTA_VERSION": "0.18.2",
|
|
"ZSH_IN_DOCKER_VERSION": "1.2.1"
|
|
}
|
|
},
|
|
"runArgs": [
|
|
"--cap-add=NET_ADMIN",
|
|
"--cap-add=NET_RAW"
|
|
],
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"anthropic.claude-code",
|
|
"dbaeumer.vscode-eslint",
|
|
"esbenp.prettier-vscode",
|
|
"eamodio.gitlens"
|
|
],
|
|
"settings": {
|
|
"editor.formatOnSave": true,
|
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
"editor.codeActionsOnSave": {
|
|
"source.fixAll.eslint": "explicit"
|
|
},
|
|
"terminal.integrated.defaultProfile.linux": "zsh",
|
|
"terminal.integrated.profiles.linux": {
|
|
"bash": {
|
|
"path": "bash",
|
|
"icon": "terminal-bash"
|
|
},
|
|
"zsh": {
|
|
"path": "zsh"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"remoteUser": "ubuntu",
|
|
"mounts": [
|
|
"source=claude-code-bashhistory-${devcontainerId},target=/commandhistory,type=volume",
|
|
"source=claude-code-config-${devcontainerId},target=/home/ubuntu/.claude,type=volume",
|
|
"source=claude-code-gh-${devcontainerId},target=/home/ubuntu/.config/gh,type=volume",
|
|
"source=${localEnv:HOME}/.gitconfig,target=/home/ubuntu/.gitconfig,type=bind,readonly"
|
|
],
|
|
"containerEnv": {
|
|
"NODE_OPTIONS": "--max-old-space-size=4096",
|
|
"CLAUDE_CONFIG_DIR": "/home/ubuntu/.claude",
|
|
"POWERLEVEL9K_DISABLE_GITSTATUS": "true",
|
|
"GIT_CONFIG_GLOBAL": "/home/ubuntu/.gitconfig.local"
|
|
},
|
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
|
|
"workspaceFolder": "/workspace",
|
|
"postCreateCommand": "uv run /opt/post_install.py"
|
|
}
|