Files
docker-docs/data/sbx_cli/sbx_template_load.yaml
David Karlsson 1773367159 Sync sbx CLI reference from release/v0.51 (#26514)
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.
2026-11-04 10:10:52 +01:00

74 lines
3.1 KiB
YAML

name: sbx template load
synopsis: Load an image from a tar file into the sandbox runtime
description: |-
Load an image from a tar file into the sandbox runtime's image store.
The loaded image can be used as a template for new sandboxes.
Tar files are typically created with: sbx template save SANDBOX TAG --output FILE
With --cloud:
Upload a tar file as a cloud template. Takes FILE and NAME; NAME must be
unique per account. Uploads can take several minutes.
--cpus and --memory-mib are required and must match a billable sandbox shape:
- micro (1 vCPU / 2048 MiB)
- small (2 vCPU / 4096 MiB)
- medium (4 vCPU / 8192 MiB)
- large (8 vCPU / 16384 MiB)
- xl (16 vCPU / 32768 MiB)
Use --capture-mode disk for a filesystem snapshot, or all to capture memory,
disk, and the microVM checkpoint for faster resume.
usage: sbx template load FILE [flags]
options:
- name: capture-mode
default_value: disk
usage: |
What gets captured for this template. "disk" (default) captures only the filesystem — cold-boot from a standard OCI image, faster load. "all" captures memory + disk + microVM checkpoint — sub-second TTI on resume, slower load. Only effective with --cloud.
- name: cpus
default_value: "0"
usage: |
vCPUs; with --memory-mib must name a billable shape (required with --cloud)
- name: description
usage: Optional template description (--cloud only)
- name: help
shorthand: h
default_value: "false"
usage: help for load
- name: memory-mib
default_value: "0"
usage: |
Memory in MiB; --cpus/--memory-mib must name a billable shape: micro (1 vCPU / 2048 MiB), small (2 vCPU / 4096 MiB), medium (4 vCPU / 8192 MiB), large (8 vCPU / 16384 MiB), xl (16 vCPU / 32768 MiB) (required with --cloud)
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-
# Load an image from a tar file
sbx template load /tmp/myimage.tar # Linux/macOS
sbx template load C:\Users\me\myimage.tar # Windows
# Use the loaded image as a template
sbx run --pull never -t myimage:v1.0 claude
# Cloud: upload a tar as a cloud-managed template (disk capture, faster load)
sbx --cloud template load /tmp/myimage.tar my-template --cpus 2 --memory-mib 4096
# Cloud: capture memory + disk + microVM checkpoint for sub-second resume
sbx --cloud template load /tmp/myimage.tar my-template --cpus 2 --memory-mib 4096 --capture-mode all
# Cloud: with a description
sbx --cloud template load /tmp/myimage.tar my-template --cpus 2 --memory-mib 4096 --description "Nightly baseline"
see_also:
- sbx template - Manage sandbox templates