| Name | Type | Description |
|---|---|---|
name* | str | Snapshot name. |
docker_image* | str | Docker image to build from (e.g., "python:3.12-slim"). |
fs_capacity_bytes* | int | Filesystem capacity in bytes. |
tag | Optional[str] | Default: None |
registry_id | Optional[str] | Default: None |
run_config | Optional[Union[RunConfig, dict[str, Any]]] | Default: None |
timeout | int | Default: 60 |
Build a snapshot from a Docker image.
Blocks until the snapshot is ready (polls with 2s interval).
Tag to publish the snapshot under, within name. Re-using a
tag moves it to the new snapshot, leaving the previous one
addressable by id. Defaults server-side to the Docker image's
own tag, else latest.
Private registry ID.
Override the Docker image's USER, WORKDIR and
ENV for sandboxes built from this snapshot: user and
work_dir replace the image's, env_vars merge over it
key by key. Omitting it adopts the image's own configuration.
Pass {"user": "0"} to keep the pre-run_config
behaviour of running as root.
Timeout in seconds when waiting for ready.