Skip to content

Instantly share code, notes, and snippets.

@jksprattler
Last active September 19, 2026 23:06
Show Gist options
  • Select an option

  • Save jksprattler/65b596321d2d2ca50909e85b7ecbbb0c to your computer and use it in GitHub Desktop.

Select an option

Save jksprattler/65b596321d2d2ca50909e85b7ecbbb0c to your computer and use it in GitHub Desktop.
Claude Code Bookworm Dev Container
{
"name": "Claude Agent Workspace (Base Bookworm)",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
},
// Drop capabilities and block privilege escalation
"runArgs": [
"--cap-drop=ALL",
"--security-opt=no-new-privileges"
],
"mounts": [
"source=claude-code-config-${devcontainerId},target=/home/vscode/.claude,type=volume"
],
"containerEnv": {
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude",
"DISABLE_AUTOUPDATER": "1"
},
"remoteEnv": {
"GH_TOKEN": "${localEnv:GH_TOKEN}",
"GIT_AUTHOR_NAME": "${localEnv:GIT_AUTHOR_NAME}",
"GIT_AUTHOR_EMAIL": "${localEnv:GIT_AUTHOR_EMAIL}"
},
"customizations": {
"vscode": {
"extensions": [
"anthropic.claude-code",
"shd101wyy.markdown-preview-enhanced"
]
}
},
"postCreateCommand": "git config --global user.name \"$GIT_AUTHOR_NAME\" && git config --global user.email \"$GIT_AUTHOR_EMAIL\" && gh auth setup-git",
"remoteUser": "vscode",
}
FROM mcr.microsoft.com/devcontainers/base:bookworm
# Pre-create the directory under the non-root user so named volumes inherit ownership
USER vscode
RUN mkdir -p /home/vscode/.claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment