mirror of
https://github.com/trailofbits/claude-code-devcontainer
synced 2026-06-21 14:11:48 +00:00
8ce9df83e7
bubblewrap fails to run with the docker seccomp profiles enabled
83 lines
3.1 KiB
JSON
83 lines
3.1 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
|
|
"name": "AI Agent Sandbox",
|
|
"build": {
|
|
"dockerfile": "Dockerfile",
|
|
"args": {
|
|
"TZ": "${localEnv:TZ:UTC}",
|
|
"GIT_DELTA_VERSION": "0.18.2",
|
|
"ZSH_IN_DOCKER_VERSION": "1.2.1"
|
|
}
|
|
},
|
|
"features": {
|
|
"ghcr.io/devcontainers/features/github-cli:1": {}
|
|
},
|
|
"runArgs": [
|
|
"--cap-add=NET_ADMIN",
|
|
"--cap-add=NET_RAW",
|
|
"--security-opt=seccomp=unconfined",
|
|
"--security-opt=apparmor=unconfined"
|
|
],
|
|
"init": true,
|
|
"updateRemoteUserUID": true,
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"anthropic.claude-code"
|
|
],
|
|
"settings": {
|
|
"terminal.integrated.defaultProfile.linux": "zsh",
|
|
"terminal.integrated.profiles.linux": {
|
|
"bash": {
|
|
"path": "bash",
|
|
"icon": "terminal-bash"
|
|
},
|
|
"zsh": {
|
|
"path": "zsh"
|
|
}
|
|
},
|
|
"files.trimTrailingWhitespace": true,
|
|
"files.insertFinalNewline": true,
|
|
"files.trimFinalNewlines": true
|
|
}
|
|
}
|
|
},
|
|
"remoteUser": "vscode",
|
|
"mounts": [
|
|
"source=devc-${localWorkspaceFolderBasename}-bashhistory-${devcontainerId},target=/commandhistory,type=volume",
|
|
"source=devc-${localWorkspaceFolderBasename}-config-${devcontainerId},target=/home/vscode/.claude,type=volume",
|
|
"source=devc-${localWorkspaceFolderBasename}-codex-${devcontainerId},target=/home/vscode/.codex,type=volume",
|
|
"source=devc-${localWorkspaceFolderBasename}-gh-${devcontainerId},target=/home/vscode/.config/gh,type=volume",
|
|
"source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,readonly",
|
|
"source=${localWorkspaceFolder}/.devcontainer,target=/workspace/.devcontainer,type=bind,readonly",
|
|
"source=${localWorkspaceFolder}/.git/config,target=/workspace/.git/config,type=bind,readonly",
|
|
"source=${localWorkspaceFolder}/.git/hooks,target=/workspace/.git/hooks,type=bind,readonly"
|
|
],
|
|
"containerEnv": {
|
|
"NODE_OPTIONS": "--max-old-space-size=4096",
|
|
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude",
|
|
"CODEX_HOME": "/home/vscode/.codex",
|
|
"POWERLEVEL9K_DISABLE_GITSTATUS": "true",
|
|
"GIT_CONFIG_GLOBAL": "/home/vscode/.gitconfig.local",
|
|
"UV_LINK_MODE": "copy",
|
|
"NPM_CONFIG_IGNORE_SCRIPTS": "true",
|
|
"NPM_CONFIG_AUDIT": "true",
|
|
"NPM_CONFIG_FUND": "false",
|
|
"NPM_CONFIG_SAVE_EXACT": "true",
|
|
"NPM_CONFIG_UPDATE_NOTIFIER": "false",
|
|
"NPM_CONFIG_MINIMUM_RELEASE_AGE": "1440",
|
|
"PYTHONDONTWRITEBYTECODE": "1",
|
|
"PIP_DISABLE_PIP_VERSION_CHECK": "1"
|
|
},
|
|
"remoteEnv": {
|
|
"CLAUDE_CODE_OAUTH_TOKEN": "${localEnv:CLAUDE_CODE_OAUTH_TOKEN:}",
|
|
"ANTHROPIC_API_KEY": "${localEnv:ANTHROPIC_API_KEY:}",
|
|
"CODEX_ACCESS_TOKEN": "${localEnv:CODEX_ACCESS_TOKEN:}",
|
|
"OPENAI_API_KEY": "${localEnv:OPENAI_API_KEY:}"
|
|
},
|
|
"initializeCommand": "test -f \"$HOME/.gitconfig\" || touch \"$HOME/.gitconfig\"",
|
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
|
|
"workspaceFolder": "/workspace",
|
|
"postCreateCommand": "uv run --no-project /opt/post_install.py"
|
|
}
|