Inside the Linux
base image.
The base image is the Linux installation that DsmackRunner boots on the Mac. It contains Docker and the program that starts a task, collects its output files and shuts the guest down.
The current image uses Debian trixie for ARM64 and adapts build and boot code from the dstack project. Browser tools, coding agents and repository files arrive with each task. This page explains how the base is built and how it handles those tasks; the architecture guide covers the macOS app that launches it.

Booting Linux · Disk layout · Running a container · Exported files · Building the image
The choices built into this image
| Choice | Implementation | Reason |
|---|---|---|
| Fixed system, separate working files | A compressed, read-only Linux filesystem plus writable task disks | Installing task dependencies or writing results leaves the reusable system unchanged. |
| Check the system during use | File hashes before boot; Linux dm-verity checks disk blocks as they are read | The expected system hash identifies the bytes Linux should execute. |
| Start the task supervisor directly | The boot script runs the supervisor instead of starting systemd, a general service manager | One program controls task preparation, container execution and result export. |
| Accept a defined set of container settings | A checked task manifest is translated into Docker Compose configuration | The task can choose supported commands, inputs and permissions within the execution rules. |
| Keep results after shutdown | A dedicated result disk holds logs, output files and their hashes | A verifier can inspect the original files after the VM has stopped. |
Booting Linux from known files
The client supplies an image manifest listing three files: the kernel, which runs Linux; the initramfs, a small startup archive; and the system disk, containing the rest of the operating system. DsmackRunner checks their SHA-256 hashes against the manifest and checks that the policy allows that manifest. It then passes the files and boot settings to libkrun, the VM monitor described in the architecture guide.
The startup script in the initramfs opens the system disk with dm-verity, Linux’s mechanism for checking disk blocks against a hash tree. The boot settings supply the expected root hash of that tree. Every block read must match; this image is configured to halt Linux if corruption is detected.
The script mounts the system as squashfs, a compressed read-only filesystem, and starts /usr/bin/dsmack-supervisor. This supervisor prepares the writable disks and starts the task. It replaces the usual systemd startup sequence.
Where the task’s files go
The macOS app attaches disk-image files to the VM. Linux sees them as devices named vda, vdb, and so on:
The scratch and result disks use ext4, a writable Linux filesystem. Temporary runtime files also use tmpfs, which stores them in memory. Each task gets new working storage; its result disk is retained for verification before temporary files are removed.
A task permitted to use private inputs can receive a fifth disk, vde. The client prepares it separately from the public task package. Its contents are outside the app’s public input hash, and the current implementation trusts the Mac’s owner with those plaintext files.
Turning the task description into a running container
The task publisher provides a container-image archive and an execution manifest: a document naming the image, command, input files, output files to collect, and permitted resource and network settings. The supervisor checks the package’s structure before unpacking it, then verifies the file hashes.
The container launcher checks the manifest and translates it into Docker Compose configuration. Compose describes the containers and their connections; Docker starts them. The image must support ARM64, and its requested settings must be supported by the launcher.
Which software runs the container?
The launcher supports runc, the standard Linux container runtime, and runsc, gVisor’s sandbox runtime. A task names the runtime it requires, and the launcher checks that the required executables and configuration are present with the expected hashes. It refuses the task if that runtime is unavailable.
The gVisor configuration uses its systrap mode, which intercepts the container’s system calls in userspace.
Which network access is permitted?
The manifest can request no network, NAT networking through a virtual gateway, or the supported gVisor hostnet configuration. The latter still uses a Docker bridge. Published TCP ports bind to the Linux guest’s loopback address, 127.0.0.1.
Network access also depends on the Mac-side connection. NAT supplies address translation; restrictions on which destinations a task may contact require their own configuration.
The browser-test preset makes specific choices: networking is off, no credentials are supplied, the container’s system files are read-only, and the process runs as a non-root user. It also fixes the allowed system calls, Linux privileges and resource limits. These settings accompany the task instead of being inherited from the operator’s everyday Docker setup.
Permission checks · Translation into Compose settings · Container launcher
The files returned for verification
The manifest names the public input files the task expects and the outputs to collect. After execution, the exporter creates a directory named after the task manifest on the result disk. Within that directory it writes:
receipt.json: the execution record, including its outcome and output hashes.outputs/index.json: the list of exported files, their sizes and hashes.outputs/streams/stdoutandoutputs/streams/stderr: the command’s captured text output, when requested.outputs/artifacts/: requested files such as test reports or screenshots.
The exporter writes outputs/EXPORT-COMPLETE last, after saving the files. That marker tells the verifier that export finished. The receipt separately records whether the task succeeded, failed or was cancelled, so a failed test run can still return useful logs.
After the VM stops, the macOS app finishes writing the result disk, hashes it, and includes that hash in its signed result statement. The recipient checks the disk hash, then the files and receipt inside it. Follow the complete verification sequence →
Building and changing the base image
The current recipe starts with an existing base image and verifies the source and artifact hashes listed by that recipe. It extracts the parent filesystem, replaces the specified guest files, and assembles a new system disk and dm-verity hash tree. The kernel and disk templates are reused when the recipe leaves them unchanged.
B44 is the name of the current reference revision. Its change is to the guest’s credential broker, a service that forwards authorized requests to an external provider. It raises two request-handling timeouts from 40 to 210 seconds and from 50 to 220 seconds. Responses are still buffered before delivery. This change produces a new system disk and verity root hash while keeping the kernel and macOS app.
A change to a guest program belongs in a new base-image revision. A new browser, coding agent or test suite belongs in a task container. A new repository snapshot is a task input. The request and verifier must agree on the corresponding hashes, so each run can be traced to the actual files it used.
Parent image recipe · B44 timeout change and recipe · Source inspection guide