Automated, isolated execution of Claude Code prompts in firewall-restricted Docker containers.
2.3K
Automated, isolated execution of Claude Code prompts in firewall-restricted Docker containers.
iterare creates git worktrees, launches containerised Claude Code instances with autonomous permissions, and maintains safety through network firewalls and container isolation. This enables "agentic loops" where Claude Code can modify codebases without human confirmation while being restricted to whitelisted network access and mounted files.
Warning — This does not fully protect from malicious code execution or data exfiltration. It simply raises the barriers to these things happening. Use at your own risk.
/workspaceInstall the CLI tool and initialise your project:
pip install iterare-llm
iterare install
iterare credentials
cd /path/to/your/project
iterare init
iterare interactive
# Create a prompt
cat > .iterare/prompts/refactor.md << 'EOF'
---
workspace: refactor-auth
branch: main
---
Refactor the authentication module to use JWT tokens.
EOF
# Execute, monitor, merge, clean up
iterare execute refactor
iterare log -f
iterare merge
iterare cleanup -y
This is a two-layer image:
| Layer | Image | Contents |
|---|---|---|
| Base | iterare-base | Claude Code Node.js application |
| Runtime | sohonet/iterare-llm | uv, jq, firewall scripts, entrypoint |
At runtime, the container mounts your worktree and credentials, configures the firewall, then launches Claude Code.
The container runs behind a whitelist-based firewall using iptables and ipsets:
api.anthropic.com, GitHub APIs, npm registry, VS Code marketplaceconfig.tomlThis prevents the autonomous agent from exfiltrating code or downloading packages from unapproved sources.
Project configuration lives in .iterare/config.toml:
[docker]
image = "sohonet/iterare-llm:latest"
[firewall]
allowed_domains = [
"pypi.org",
"files.pythonhosted.org",
]
Pass host environment variables into the container:
iterare execute my-prompt --env PIP_INDEX_URL --env GITHUB_TOKEN
iterare interactive --env PIP_INDEX_URL
| Command | Description |
|---|---|
iterare init | Initialise a project |
iterare install | Create global config directories |
iterare credentials | Fetch Claude Code credentials |
iterare execute <prompt> | Run a prompt autonomously |
iterare interactive | Launch an interactive session |
iterare log [-f] | View execution logs |
iterare list | List execution runs |
iterare merge | Merge worktree branch back |
iterare cleanup | Remove worktree and branch |
Content type
Image
Digest
sha256:04b495663…
Size
646.5 MB
Last updated
about 1 month ago
docker pull sohonet/iterare-llm