Files
docker-docs/data/sandbox-cli/docker_sandbox_create.yaml
David Karlsson 66ff3c700c update sandbox cli ref (#24042)
- **sandboxes: regenerate, vendor cli reference docs**
- **chore: move `docker sandbox create` to a section page**

---------

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-01-30 12:53:35 +01:00

150 lines
4.0 KiB
YAML

command: docker sandbox create
short: Create a sandbox for an agent
long: |-
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.
usage: docker sandbox create [OPTIONS] AGENT WORKSPACE
pname: docker sandbox
plink: docker_sandbox.yaml
cname:
- docker sandbox create cagent
- docker sandbox create claude
- docker sandbox create codex
- docker sandbox create copilot
- docker sandbox create gemini
- docker sandbox create kiro
clink:
- docker_sandbox_create_cagent.yaml
- docker_sandbox_create_claude.yaml
- docker_sandbox_create_codex.yaml
- docker_sandbox_create_copilot.yaml
- docker_sandbox_create_gemini.yaml
- docker_sandbox_create_kiro.yaml
options:
- option: load-local-template
value_type: bool
default_value: "false"
description: |
Load a locally built template image into the sandbox (useful for testing local changes)
details_url: '#load-local-template'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: name
value_type: string
description: |
Name for the sandbox (default: <agent>-<workdir>, letters, numbers, hyphens, and underscores)
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: quiet
shorthand: q
value_type: bool
default_value: "false"
description: Suppress verbose output
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: template
shorthand: t
value_type: string
description: |
Container image to use for the sandbox (default: agent-specific image)
details_url: '#template'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: debug
shorthand: D
value_type: bool
default_value: "false"
description: Enable debug logging
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: socket
value_type: string
description: |
Connect to daemon at specific socket path (for development/debugging)
deprecated: false
hidden: true
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
### Create a Claude sandbox
```console
$ docker sandbox create claude ~/my-project
```
### Create with a custom name
```console
$ docker sandbox create --name my-sandbox claude ~/my-project
```
### Use a custom base image (-t, --template) {#template}
```text
--template IMAGE
```
Specify a custom container image to use as the sandbox base:
```console
$ 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-local-template}
Load a locally built template image for testing:
```console
$ 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:
```console
$ 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:
```console
$ docker sandbox run claude ~/my-project
```
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false