docker sandbox create
| Description | Create a sandbox for an agent |
|---|---|
| Usage | docker sandbox create [OPTIONS] AGENT WORKSPACE |
Description
Create a sandbox with access to a host workspace for an agent.
Available agents are provided as subcommands. Use "create AGENT --help" for agent-specific options.
Options
| Option | Default | Description |
|---|---|---|
--load-local-template | Load a locally built template image into the sandbox (useful for testing local changes) | |
--name | Name for the sandbox (default: | |
-q, --quiet | Suppress verbose output | |
-t, --template | Container image to use for the sandbox (default: agent-specific image) |
Examples
Create a Claude sandbox
$ docker sandbox create claude ~/my-project
Create with a custom name
$ docker sandbox create --name my-sandbox claude ~/my-project
Use a custom base image (-t, --template)
--template IMAGESpecify a custom container image to use as the sandbox base:
$ docker sandbox create --template python:3-alpine claude ~/my-project
By default, each agent uses a pre-configured image.
Use locally built template (--load-local-template)
Load a locally built template image for testing:
$ docker sandbox create --load-local-template claude ~/my-project
This is useful when developing or testing changes to sandbox templates.
Create and run immediately
After creating a sandbox, use run to start the agent:
$ docker sandbox create --name my-sandbox claude ~/my-project
$ docker sandbox run my-sandbox
Or use docker sandbox run directly to create and run in one step:
$ docker sandbox run claude ~/my-project
Subcommands
| Command | Description |
|---|---|
docker sandbox create cagent | Create a sandbox for cagent |
docker sandbox create codex | Create a sandbox for codex |
docker sandbox create gemini | Create a sandbox for gemini |
docker sandbox create kiro | Create a sandbox for kiro |