When to use this
The default sandbox image is clean, which also means it is empty. As soon as an agent needs a specific toolchain — a Node stack,ffmpeg, a compiler, an internal CLI, a set of pinned versions — installing it after every boot is slow, not reproducible, and fails outright when the network is restricted.
More often, you already have the image. Your team’s standard dev image, your CI image, or a project’s official image. You just want the agent to live in it.
BoxLite reduces that to one parameter: pass an image reference to image= to pull from a registry, or a local OCI image layout directory to rootfs_path= for offline use. Whatever the image contains, the box has — and every box is still a fully isolated microVM.
Architecture
The isolation properties do not change with the source. A custom image widens what the agent can do; it does not widen what it can reach.Prerequisites
- BoxLite installed and a working virtualization host — see Installation.
- Network access to your registry, or a local OCI image layout on disk.
Build it
Option 1: pull a public image
Pass a fully qualified reference and the image becomes the box’s root filesystem.Option 2: an image that already carries the toolchain
Same parameter, different image — the agent gets a full Node runtime with nothing to install.Option 3: offline, from a local OCI image layout
When the box must not reach a registry at all, point at a directory on disk instead.rootfs_path takes precedence over image.
Run it
Trust and limits
- The image defines capability, not exposure. A richer image gives the agent more tools; it does not change the microVM boundary or open the network further. Whatever the image contains still runs on its own kernel and filesystem.
- You inherit the image’s trust posture. A base image with a vulnerable library, or one from an unverified source, brings that into the box. Pin digests for anything you depend on, and prefer images you build.
- The first pull is slow, later starts are not. Layers are cached by digest and deduplicated across images, so the cost lands once per image.
- Disk is finite. Large toolchains plus runtime installs can exhaust the default box disk — the failure is
OSError: [Errno 28] No space left on device. Size it withdisk_size_gb. imageandrootfs_pathare alternatives. Supplying neither raisesValueErrorat construction; supplying both meansrootfs_pathwins.
Troubleshooting
Next steps
- Give each tenant its own image. Combine with Give each user a persistent shell for per-user dev boxes.
- Configure a private registry once. Image registry configuration covers credentials and resolution order.
- Constrain what the richer image can reach — Run untrusted tools safely.

