Run AI coding agents safely inside Docker containers using DevPod.
AI coding agents are powerful. Running them unconstrained on your computer is risky. This template runs them 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 and Codex CLI are automatically installed and ready to use.
- Claude Code - Anthropic's AI coding assistant (auto-installed)
- OpenAI Codex CLI - OpenAI's AI coding agent (auto-installed)
- Python + uv - Python with fast package management
- Rust - Full Rust toolchain with rust-analyzer
- Node.js - JavaScript runtime
- Git + GitHub CLI - Version control
Once the container opens in VS Code:
# Start with all permissions (recommended for containers)
claude --dangerously-skip-permissions
# Or start with normal permissions
claude# Start in yolo mode - no approvals or sandbox (recommended for containers)
codex --yolo
# Or start with normal permissions
codexEdit .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 configuration with VS Code extensionssetup.sh- Post-creation script that installs Claude Code, Codex CLI, and uv
The .claude/settings.json file pre-configures Claude Code to bypass permission prompts (safe within containers).