Skip to main content
Three layers, in the order a box uses them: image cacherootfs assemblyvolume mounts. For the SDK-facing volumes parameter, see Volumes and mounts.

Image cache (OCI, deduplicated by digest)

A box uses standard OCI container images. Image layers (blobs) are stored by content digest in a local cache; multiple boxes and multiple images share the same layer and never re-download it. Source src/boxlite/src/images/; the default cache directory is ~/.boxlite/images/ (blobs stored by digest).

Rootfs assembly (overlay + copy-on-write)

Before the box starts, the rootfs builder overlays the OCI image layers into a container filesystem, injects the DNS configuration, and creates a copy-on-write (CoW) snapshot. Each box thereby gets an independent writable view while sharing the read-only base layers. Source src/boxlite/src/rootfs/.

Volumes and persistent disks (virtiofs / QCOW2)

Source src/boxlite/src/volumes/.

Mounting a Volume from the SDK (key: the third element is a boolean read_only)

Do not write (host_dir, "/ro", "ro"). At the SDK layer the third element is a bool; passing a string raises TypeError (see Troubleshooting). The "ro"/"rw" string syntax belongs only to the CLI’s -v host:box:ro and differs from the SDK API.