Run Claude Code safely inside Docker containers using DevPod.
Claude Code is powerful. Running it unconstrained on your computer is risky. This template runs it within Docker containers to mitigate the risk of data loss or corruption from hallucinations.
DevPod is an open source alternative to GitHub Codespaces. It lets you spin up development containers from a .devcontainer configuration with a single command.
(Skip if you've done this before)
- Install Docker
- Install DevPod CLI
- Add Docker to DevPod as the default provider:
devpod provider add docker
devpod provider use docker- Clone this repository and
cdinto it - Run
devpod up . --ide vscode
That's it! Claude Code is automatically installed and ready to use.
- Claude Code - Anthropic's AI coding assistant (auto-installed)
- Python + uv - Python with fast package management
- Node.js - JavaScript runtime
- Git + GitHub CLI - Version control
Once the container opens in VS Code:
# Start Claude Code (recommended for containers)
claude --dangerously-skip-permissions
# Or start with normal permissions
claudeEdit .devcontainer/devcontainer.json to customize your environment:
- Change the base image (Debian, Fedora, etc.)
- Add/remove language features (Julia, Go, etc.)
- Add VS Code extensions
- Modify the setup script in
.devcontainer/setup.sh
See devcontainer features for available options.
The .devcontainer/ folder contains:
devcontainer.json- Container configurationsetup.sh- Post-creation script that installs Claude Code and uv
The .claude/settings.json file pre-configures Claude Code to bypass permission prompts (safe within containers).