Files
docker-docs/data/sandbox-cli/docker_sandbox_create.yaml
2026-02-12 15:11:21 +01:00

143 lines
3.8 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
- docker sandbox create opencode
- docker sandbox create shell
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
- docker_sandbox_create_opencode.yaml
- docker_sandbox_create_shell.yaml
options:
- option: name
value_type: string
description: |
Name for the sandbox (default: <agent>-<workdir>, letters, numbers, hyphens, underscores, periods, plus signs and minus signs only)
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: pull-template
value_type: string
default_value: missing
description: |
Template image pull policy: always (always pull from registry), missing (pull only if not cached), never (use only cached images)
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.
### 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