🐳 Docker Sandbox Provider - Version 1.27.0
Execute Claude Code in isolated local Docker containers with complete control over your development environment.
✨ New Features
Docker Sandbox Provider
- Fully Local Execution: Run Claude Code in isolated Docker containers
- Claude Agent SDK Integration: Correct async generator implementation for reliable code generation
- Multi-Directory File Detection: Automatically finds and exports generated files from
/appand/tmp - Specialized Agent Support: Works with all 160+ agents from the marketplace
- Automated Execution:
--yesflag for CI/CD and scripting workflows - Custom Environments: Bring your own Docker images
📦 What's Included
Core Files
Dockerfile- Node.js 22 Alpine base image with development toolsdocker-launcher.js- Container lifecycle orchestrationexecute.js- Claude SDK execution with async generator supportpackage.json- Runtime dependenciesREADME.md- Complete documentation and troubleshooting guide
Web Documentation
- Docker provider section on component pages
- Provider comparison table (E2B vs Cloudflare vs Docker)
- Installation instructions and prerequisites
- Usage examples and best practices
🚀 Usage
Basic Usage
npx claude-code-templates@latest \
--sandbox docker \
--prompt "Write a REST API with Express" \
--yesWith Specialized Agent
npx claude-code-templates@latest \
--sandbox docker \
--agent programming-languages/javascript-pro \
--prompt "Create a function to add two numbers" \
--yes📋 Requirements
- Docker Desktop installed and running
- Anthropic API key configured
- Node.js 14+ (for CLI)
📊 Provider Comparison
| Feature | E2B | Cloudflare | Docker |
|---|---|---|---|
| Location | ☁️ Cloud | 🌍 Edge | 🏠 Local |
| Setup | Easy | Easy | Medium |
| Best For | Full stack | Serverless | Local dev |
| API Keys | Anthropic + E2B | Anthropic | Anthropic |
🔧 Technical Improvements
- Correct SDK Usage: Implemented async generator iteration for
query() - Enhanced File Search: Scans multiple directories with
findcommand - Smart Prompts: Informs Claude about working directory context
- Flag Support:
--yesflag now works correctly for sandbox execution - Error Handling: Comprehensive error messages and troubleshooting
🐛 Bug Fixes
- Fixed async generator iteration in Claude Agent SDK
- Fixed
--yesflag not skipping agent selection prompts - Fixed file detection to include
/tmpdirectory - Removed misleading "works offline" messaging
📚 Documentation
- Component Page: https://aitmpl.com/component.html (Docker tab)
- README:
cli-tool/components/sandbox/docker/README.md - NPM: https://www.npmjs.com/package/claude-code-templates
🎯 Use Cases
- Local development without cloud dependencies
- Testing code in isolated environments
- Custom Docker environments with specific tools
- CI/CD integration with containerized testing
- Offline development (after initial setup)
📈 Stats
- Package Size: 375.9 kB
- Total Files: 92
- New Files: 5 (Docker sandbox components)
- Lines Changed: 1,671 insertions, 62 deletions
🔗 Links
- NPM Package: https://www.npmjs.com/package/claude-code-templates
- Documentation: https://aitmpl.com
- GitHub: https://github.com/davila7/claude-code-templates
💬 Feedback
Found a bug or have a feature request? Open an issue
Full Changelog: v1.26.4...v1.27.0
🤖 Generated with Claude Code