sand boots a container image in a gVisor-family runtime, forks running sandboxes instead of cold-booting new ones, and puts every runtime under the same commands. Stock gVisor, the copy-on-write fork RFC, TimeTravelContainer, or the runsc you patched last night.
Fork clones a sandbox with its processes, memory and filesystem. A paused sandbox is a template, and forking it is cheaper because its state cannot change.
Import a docker save archive and run it cold. Rootless, with no daemon, and no network inside the sandbox yet.
$ docker save python:3.12-alpine | sand image import - $ sand run python python -c 'print(1)'
Start a sandbox detached, let it warm up, then pause it. Its state stops changing, so it can be forked cheaply.
$ T=$(sand run -d python python -c 'import json, time; time.sleep(1e9)') $ sand pause $T
Children start with the template's memory. Fork a running sandbox instead to branch it in the middle of a task.
$ sand fork -n 100 $T $ sand bench -n 100 -c 8 -from $T true
An adapter drives each runtime and no runtime code is vendored. That makes it cheap to point sand at a patched build and compare it with stock gVisor.
| Name | Fork | Isolation between forks | How experimental |
|---|---|---|---|
| gvisor | Checkpoint and restore | Separate process per sandbox | Stock gVisor from the official release.The baseline everything else is compared with. |
| fork RFC | Copy-on-write from a native template | Separate process per sandbox | The sandbox-fork RFC, gvisor#17850.KVM only, and it needs real root. |
| ttc | Live copy-on-write | One shared Sentry per fork family | NVlabs TimeTravelContainer.Its own documentation says it is not a production security boundary. |
| yours | Whatever your patch does | Up to you | A fork that keeps the runsc CLI needs no code, only an entry.sand runtime add myfork -adapter runsc -bin /path/to/runsc -platform kvm |
sand is a Go library with a thin CLI on top. This is what it does not do.