Running Docker Sandboxes on Raspberry Pi 5
Docker Sandboxes (sbx v0.54.0) runs on an 8 GB Raspberry Pi 5: local microVMs start, run Docker inside themselves and enforce a network policy. After the first pull, creating a sandbox took about 8 seconds. Test setup Every result below comes from one board, with a second sandbox running Claude Code alongside the tests. Item Value Board Raspberry Pi 5 Model B Rev 1.1, 4 Cortex-A76 cores, 2.4 GHz…
Docker Sandboxes (sbx v0.54.0) are now available on an 8 GB Raspberry Pi 5, allowing the execution of local microVMs that run Docker inside themselves and enforce a network policy. The installation process involves downloading the appropriate DockerSandboxes-linux-arm64-ubuntu2604.deb package, granting the user permission to access KVM, and cleaning up the repository after installation.
The setup was tested on a Raspberry Pi 5 Model B Rev 1.1, featuring 4 Cortex-A76 cores, 2.4 GHz max clock speed, and 7.7 GiB of usable memory.
Following installation, the first sandbox was created with the command: sbx create --name demo --cpus 1 -m 1g shell. Within the sandbox, the tests ran successfully, showing its own kernel, userland, and Docker Engine. The host and sandbox's operating systems, Docker versions, and user accounts differed, ensuring the isolated environment.
The network policy was tested by attempting to access different websites. https://pypi.org was accessible while https://example.com was blocked, demonstrating the sandbox's enforcement capabilities. Ports and files within the sandbox could be published, listed, unpublished, and copied, both in and out of the sandbox environment.
The workspace feature allowed files to be passed to the sandbox and created inside the sandbox, with both write and read capabilities. Templates were used to save and restore the sandbox's state, ensuring the presence of files from one sandbox in another. Environment variables and secrets were also tested, highlighting the need for manual intervention with certain commands.
The process of creating and stopping sandboxes, along with running Docker commands within them, showed varying timings. The first sandbox creation took the longest, approximately 2 minutes and 15 seconds, while subsequent creations and executing commands within running sandboxes were much quicker. Memory usage was noted as the limiting factor on the 8 GB board, with the sandbox defaulting to 50% of the host's memory.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to