- Package with the token-helper.sh to automate loading a zero-trust AI dev container using GitHub fine-grained PAT's.
- Ref blog writeup for usage details: Secure Git Automation for Claude Code with Dev Containers and Fine-Grained PATs
Last active
September 19, 2026 23:06
-
-
Save jksprattler/65b596321d2d2ca50909e85b7ecbbb0c to your computer and use it in GitHub Desktop.
Claude Code Bookworm Dev Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "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", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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