How it works
Read this when you want to know what a build makes, or a build fails. A site is made in five layers:
- Boot layer. snowglobe adds a kernel, an initramfs that mounts the root filesystem
over 9p, and BusyBox's
initandgettywith a terminal running your command, as files on top of your image's layers. Nothing runs in the image. - Filesystem. The flattened layers become a 9p filesystem: a JSON tree and one compressed blob per unique file, fetched on demand. Files of 2 MiB and more are split into content-defined chunks, so a read fetches only what it covers.
- Snapshot. The guest boots headless until the app is ready, and the whole machine is
saved. Visitors,
snowglobe run, bundles andsnowglobe mcpall restore it. - Machines. Natively, the snapshot's memory becomes an image the host maps
copy-on-write into every instance, and a template restores once and forks a machine per command, per
snowglobe upor per service replica, each sharing what it doesn't write. - Warm pack. The files a restored machine reads (left to settle, then exercised) are bundled into one download, in the order it first read them, which the page streams in the background.
When a build goes wrong
- "the boot stalled". Nothing was printed, fetched or computed for 5 minutes before the
app was ready. The build prints every CPU's state and boots once more; twice usually means the app
waits for something that never comes, such as
--readytext it never prints.SNOWGLOBE_BOOT_STALL_SECSchanges the limit, and0turns it off. - "not arm64". Build
FROM alpineorarm64v8/alpine; on an x86 host, install QEMU's binfmt handlers first. - A request answers 502. In a page, the server doesn't allow CORS. Under
snowglobe runthe same request goes out from your machine instead. - A service doesn't start. There is no OpenRC: start it from the image's command.