mirror of
https://github.com/docker/docs.git
synced 2026-11-04 10:01:00 +00:00
Vendor the checked-in CLI YAML from Docker Sandboxes release/v0.51 at 7d55286de0c7. This updates command help, adds `sbx policy check http`, and replaces seven agent-specific create pages with redirects to `sbx create`. Validation: full site build with Hugo 0.169.0; upstream byte-for-byte comparison; all 115 command pages, reference links, and seven redirects checked; template formatting and whitespace checks passed.
88 lines
4.2 KiB
YAML
88 lines
4.2 KiB
YAML
name: sbx env create
|
|
synopsis: Create a sandbox environment from sbxenv.yaml
|
|
experimental: true
|
|
description: |-
|
|
Read the environment file from PATH (default: current directory),
|
|
provision its declared secrets at the sandbox scope, merge its credential
|
|
bindings, and create the sandbox. Use "sbx env run" to attach.
|
|
|
|
Each PATH may be a directory (the file is <PATH>/sbxenv.yaml) or the
|
|
path to the environment file itself. Passing more than one PATH deep-merges them
|
|
in order (docker-compose `-f` semantics): later files override earlier ones.
|
|
Values may reference the arguments the file declares with ${{ env.args.NAME }},
|
|
supplied by --env-arg, plus ${{ env.projectDir }} and ${{ env.fileDir }}.
|
|
Nothing else is expanded, so a "$" is literal text.
|
|
|
|
A directory PATH selects sbxenv.yaml; a file PATH selects that file.
|
|
With no PATH, ~/.sbxenv.yaml supplies shared defaults when present.
|
|
Explicit PATHs skip those defaults. Later files override earlier values;
|
|
lists such as ports and mcp.servers are concatenated.
|
|
usage: sbx env create [PATH...] [flags]
|
|
options:
|
|
- name: clone
|
|
default_value: "false"
|
|
usage: |
|
|
Override workspace.clone in sbxenv.yaml (see 'sbx create --clone')
|
|
- name: env-arg
|
|
default_value: '[]'
|
|
experimental: true
|
|
usage: |
|
|
Value for an argument the environment file declares, as name=value (can be repeated)
|
|
- name: env-args-file
|
|
default_value: '[]'
|
|
experimental: true
|
|
usage: |
|
|
File of name=value environment arguments, one per line (can be repeated); --env-arg overrides
|
|
- name: force
|
|
shorthand: f
|
|
default_value: "false"
|
|
usage: Apply the environment plan without asking
|
|
- name: help
|
|
shorthand: h
|
|
default_value: "false"
|
|
usage: help for create
|
|
- name: kit-arg
|
|
default_value: '[]'
|
|
experimental: true
|
|
usage: |
|
|
Value for an argument a kit declares, as name=value for every kit or kit.name=value for one (can be repeated); overrides the args a kits: entry pins in sbxenv.yaml
|
|
- name: kit-args-file
|
|
default_value: '[]'
|
|
experimental: true
|
|
usage: |
|
|
File of name=value kit arguments, one per line (can be repeated); --kit-arg overrides
|
|
- name: name
|
|
usage: |
|
|
Name for the sandbox, overriding 'name:' in sbxenv.yaml and the derived <agent>-<directory> (every 'sbx env' command addressing this environment needs the same value)
|
|
- name: on-timeout
|
|
usage: |
|
|
What happens when --ttl lapses: 'stop' stops the sandbox in place so it can be started again later, 'restart' keeps it running by stopping and immediately starting it, or 'delete' removes it. Omit the flag and the server stops the sandbox when it can be started again later, and deletes it otherwise. With 'restart' a supplied --ttl must be at least 1h (cloud only). Only applies when the sandbox is created; 'sbx --cloud env run' refuses it when attaching to an existing one.
|
|
- name: skip-host-commands
|
|
default_value: "false"
|
|
usage: |
|
|
Skip host lifecycle commands and disable environment MCP commands until a later env run without this flag
|
|
- name: ttl
|
|
usage: |
|
|
Cloud sandbox time-to-live before it times out (e.g. 30m, 2h, 1h30m; units are case-insensitive; cloud only; default: server-side). Only applies when the sandbox is created; 'sbx --cloud env run' refuses it when attaching to an existing one
|
|
inherited_options:
|
|
- name: cloud
|
|
default_value: "false"
|
|
usage: |
|
|
Dispatch to Docker Cloud Sandboxes API instead of local sandboxd (supported by a growing set of verbs — run 'sbx --cloud --help' for the current list)
|
|
- name: debug
|
|
shorthand: D
|
|
default_value: "false"
|
|
usage: Enable debug logging
|
|
- name: no-input
|
|
default_value: "false"
|
|
usage: |
|
|
Never prompt; commands that need an answer fail with the command to run instead
|
|
example: |4-
|
|
# Create the environment described in the current directory
|
|
sbx env create
|
|
|
|
# Approve the plan without asking
|
|
sbx env create --force ./project
|
|
see_also:
|
|
- sbx env - (Experimental) Manage sandboxes declaratively from an sbxenv.yaml file
|