Docker sandbox templates for AI coding agents (ClaudeCode,Codex & Gemini) with web UI (CloudCLI OSS)
3.5K
Docker Sandbox templates that add CloudCLI on top of Claude Code, Codex, and Gemini CLI. You get a full web and mobile IDE accessible from any browser on any device.
Docker Sandboxes run agents in isolated microVMs. Install the sbx CLI:
brew install docker/tap/sbxwinget install -h Docker.sbxsudo apt-get install docker-sbxFull instructions: docs.docker.com/ai/sandboxes/get-started
sbx manages credentials securely — your API key never enters the sandbox. Store it once:
sbx login
sbx secret set -g anthropic
npx @cloudcli-ai/cloudcli sandbox ~/my-project
Open http://localhost:3001. Set a password on first visit. Start building.
Store the matching API key and pass --agent:
# OpenAI Codex
sbx secret set -g openai
npx @cloudcli-ai/cloudcli sandbox ~/my-project --agent codex
# Gemini CLI
sbx secret set -g google
npx @cloudcli-ai/cloudcli sandbox ~/my-project --agent gemini
| Agent | Template |
|---|---|
| Claude Code (default) | docker.io/cloudcliai/sandbox:claude-code |
| OpenAI Codex | docker.io/cloudcliai/sandbox:codex |
| Gemini CLI | docker.io/cloudcliai/sandbox:gemini |
These are used with --template when running sbx directly (see Advanced).
cloudcli sandbox ls # List all sandboxes
cloudcli sandbox stop my-project # Stop (preserves state)
cloudcli sandbox start my-project # Restart and re-launch web UI
cloudcli sandbox logs my-project # View server logs
cloudcli sandbox rm my-project # Remove everything
Your project directory is mounted bidirectionally — edits propagate in real time, both ways.
Set variables at creation time with --env:
npx @cloudcli-ai/cloudcli sandbox ~/my-project --env SERVER_PORT=8080
Or inside a running sandbox:
sbx exec my-project bash -c 'echo "export SERVER_PORT=8080" >> /etc/sandbox-persistent.sh'
sbx exec my-project bash -c 'pkill -f "server/index.js"; . ~/.cloudcli-start.sh'
| Variable | Default | Description |
|---|---|---|
SERVER_PORT | 3001 | Web UI port |
HOST | 0.0.0.0 | Bind address (must be 0.0.0.0 for sbx ports) |
DATABASE_PATH | ~/.cloudcli/auth.db | SQLite database location |
sbx directlyFor branch mode, multiple workspaces, memory limits, or the terminal agent experience, use sbx with the template:
# Terminal agent + web UI
sbx run --template docker.io/cloudcliai/sandbox:claude-code claude ~/my-project --name my-project
sbx ports my-project --publish 3001:3001
# Branch mode (Git worktree isolation)
sbx run --template docker.io/cloudcliai/sandbox:claude-code claude ~/my-project --branch my-feature
# Multiple workspaces
sbx run --template docker.io/cloudcliai/sandbox:claude-code claude ~/project ~/shared-libs:ro
# Pass a prompt directly
sbx run --template docker.io/cloudcliai/sandbox:claude-code claude ~/my-project -- "Fix the auth bug"
CloudCLI auto-starts via .bashrc when using sbx run.
Full options in the Docker Sandboxes usage guide.
Sandboxes restrict outbound access by default. To reach host services from inside the sandbox:
sbx policy allow network localhost:11434
# Inside the sandbox: curl http://host.docker.internal:11434
The web UI itself doesn't need a policy — access it via sbx ports.
AGPL-3.0-or-later
Content type
Image
Digest
sha256:629e411b7…
Size
1.3 GB
Last updated
about 1 month ago
docker pull cloudcliai/sandbox:codex