{"slug": "running-docker-sandboxes-on-raspberry-pi-5", "title": "Running Docker Sandboxes on Raspberry Pi 5", "summary": "A developer ran Docker Sandboxes (sbx v0.54.0) on an 8 GB Raspberry Pi 5, confirming that local microVMs boot, run Docker inside themselves and enforce a network policy, with sandbox creation taking about 8 seconds after the first pull. The setup used Ubuntu 26.10 arm64 with KVM, and because Docker's apt repository had no arm64 docker-sbx package for that release, the developer installed the 26.04 .deb from the releases page instead. Per-sandbox network rules, port publishing, file copying, folder mounts and template snapshots all worked as documented, and sbx diagnose reported 16 checks passed and none failed.", "body_md": "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.\n\nEvery result below comes from one board, with a second sandbox running Claude Code alongside the tests.\n\n| Item | Value | \n|---|---|\n| Board | Raspberry Pi 5 Model B Rev 1.1, 4 Cortex-A76 cores, 2.4 GHz max | \n| Memory | 7.7 GiB usable | \n| OS | Ubuntu 26.10 desktop, arm64 | \n| Kernel | 7.3.0-1003-raspi, 4 KB pages | \n| Storage | 58 GB root volume on mmcblk0 | \n| Docker Engine on host | Not installed, and not needed | \n\nDocker's install page asks for Ubuntu 24.04 or later, a 64-bit Arm processor and KVM. It does not mention Raspberry Pi, so treat this as a report from one board and not a support statement. Raspberry Pi OS was not tested.\n\nFirst confirm that KVM is available and that your user can open it:\n\n```\nls -l /dev/kvm\nsudo usermod -aG kvm $USER   # then sign out and back in\n```\n\nDocker documents two commands for installing sbx without Docker Engine:\n\n```\ncurl -fsSL https://get.docker.com | sudo REPO_ONLY=1 sh\nsudo apt install docker-sbx\n```\n\nThat route was not available on Ubuntu 26.10: on 22 November 2026 Docker's apt repository had no arm64 docker-sbx package for stonking. The 26.04 package from the releases page installed cleanly instead:\n\n```\ncurl -fsSLO https://github.com/docker/sbx-releases/releases/download/v0.54.0/DockerSandboxes-linux-arm64-ubuntu2604.deb\necho \"21c12141a3732502cf75c0141245b2090f28803a759961c2a16dbed06bcb51d0  DockerSandboxes-linux-arm64-ubuntu2604.deb\" | sha256sum -c\nsudo apt install ./DockerSandboxes-linux-arm64-ubuntu2604.deb\n```\n\nThe release also has a tarball that installs without root. Ubuntu restricts unprivileged user namespaces, and the AppArmor profile in that tarball covers only `/usr/libexec`, so the .deb is the safer choice. The tarball route was not tried.\n\nSign in, then check the result:\n\n```\nsbx login\nsbx diagnose\n```\n\nAfter sign-in, `sbx diagnose` reported 16 checks passed, 4 skipped and none failed.\n\nThis creates a plain shell sandbox with no host folder attached:\n\n```\nsbx create --name demo --cpus 1 -m 1g shell\nsbx exec demo uname -a\nsbx exec demo docker run --rm hello-world\nsbx stop demo\nsbx rm --force demo\n```\n\nInside, the test sandbox had:\n\n`agent`, with `-u root` available on `sbx exec`\nThe 1 CPU and 1 GB limits held: `nproc` returned 1 and `free -m` showed 986 MB. For a coding agent, run `sbx run claude` from your project folder.\n\nThe policy here denied anything without a matching rule. [https://pypi.org](https://pypi.org) returned 200 from inside the sandbox and [https://example.com](https://example.com) returned 403. A rule scoped to one sandbox changed that at once, and left the global policy alone:\n\n```\nsbx policy check network example.com\nsbx policy allow network --sandbox demo example.com\nsbx policy deny network --sandbox demo pypi.org\nsbx policy log demo\nsbx policy rm network --force --sandbox demo --resource example.com\n```\n\nAfter those rules example.com returned 200 and pypi.org returned 403. The log named the rule behind each block.\n\n```\nsbx port publish demo 18080:8000\nsbx port ls demo\nsbx port unpublish demo 18080:8000\nsbx cp a.txt demo:/tmp/a.txt\nsbx cp demo:/tmp/b.txt b.txt\n```\n\nA Python web server inside the sandbox answered on 127.0.0.1:18080, and stopped answering after the unpublish. Copies worked in both directions.\n\nA folder passed to `sbx create` is mounted at the same path inside the sandbox, and files written there appear on the host. Adding `:ro` worked too: a write failed with `Read-only file system`.\n\nStop the sandbox, save it, and start another from the snapshot:\n\n```\nsbx stop demo\nsbx template save demo demo:v1\nsbx create --name demo2 --pull never -t demo:v1 shell ./ws\n```\n\nA file written in the first sandbox was present in the second.\n\nThe experimental `sbx env` commands read an `sbxenv.yaml` file:\n\n```\nschemaVersion: \"1\"\nname: demo-env\nagent: shell\nworkspace: ${{ env.projectDir }}\nenv:\n  HELLO: pi5\nsbx env plan\nsbx env create --force\nsbx env exec sh -c 'echo $HELLO'\nsbx env rm --force\n```\n\nOnly the first create is slow. These are single runs or small samples, with 1 CPU per sandbox and another sandbox running, so read them as a guide and not a benchmark.\n\n| Action | Time | \n|---|---|\n| First `sbx create shell` , including the download | 2 min 15 s | \n| Later `sbx create shell` | 8.4 s | \n| `sbx create` from a saved template | 8.0 s | \n| `sbx exec` on a stopped sandbox, including start (4 runs) | 2.3 to 4.1 s | \n| `sbx exec` on a running sandbox, simple commands | 0.7 to 1.7 s | \n| `sbx stop` | 0.7 to 3.4 s | \n| `docker run --rm hello-world` inside, including the pull | 6.2 s | \n\nMemory is the limit to watch on an 8 GB board. The help text says a sandbox defaults to 50% of host memory, so set `-m` if you plan to run more than one. With two sandboxes up, the host had about 2.1 GiB available. The kernel log showed no out-of-memory kills. One temperature reading, not taken under sustained load, was 55.7 °C.\n\n`sbx run` with no path mounts the current folder.`sbx create` with no path when you want no host files attached.`sbx template save` prompted while the sandbox was running.`--force`.` sbx policy rm network` refuses to run unless you pass it.`cannot mix v3 kits with v1/v2 kits in one sandbox`.` sbx secret set-custom` on a running sandbox, the variable was empty, and the output said it may need updating by hand.`sbx template rm`, `sbx template ls` still showed a `sandbox-kit-assembled` image, which needed its own rm.`--clone` needs Git on the host.`sbx volume ls`, `sbx schedule ls` and `sbx template inspect` ask for `--cloud`.\nAll 129 entries found by walking the help output, groups included, answered `--help`. Of these, 54 were also run successfully, and the main gaps are listed after the table.\n\n| Area | Run successfully | \n|---|---|\n| Lifecycle | create, run --detach, exec, inspect, ls, cp, stop, rm, prune --dry-run | \n| Ports | port publish, port ls, port unpublish | \n| Policy | ls, inspect, log, refresh, check network, check http, allow network, deny network, rm network, profile ls, approval ls | \n| Daemon and host | version, diagnose, df, daemon status, daemon log-level, completion for bash, zsh, fish and PowerShell | \n| Settings and secrets | settings ls, settings get, settings unset, secret ls, secret set-custom | \n| Templates | template save, template ls, template rm | \n| MCP and skills | mcp add, mcp ls, mcp inspect, mcp rm, mcp auth status, skills ls | \n| Kits | kit validate, kit inspect, kit pack, kit builder status | \n| Environments | env plan, env create, env exec, env rm | \n\nRan but returned an error: `settings set` (the value tried was not valid), `kit add` (v2 and v3 kits), `kit provenance` (none attached), `policy approval inspect` (nothing pending), and the three cloud-only commands listed above.\n\nNot run:\n\n`mcp add` was checked with a placeholder command, so registration is confirmed but not a working server.", "url": "https://wpnews.pro/news/running-docker-sandboxes-on-raspberry-pi-5", "canonical_source": "https://dev.to/ajeetraina/running-docker-sandboxes-on-raspberry-pi-5-1k8n", "published_at": "2026-11-22 10:40:47+00:00", "updated_at": "2026-11-22 10:42:38.949987+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["Docker", "Raspberry Pi 5", "Ubuntu", "Claude Code", "Docker Sandboxes", "KVM"], "also_reported_by": [], "takeaway": "Docker Sandboxes v0.54.0 runs on an 8 GB Raspberry Pi 5 with KVM, creating a microVM sandbox in about 8 seconds and enforcing per-sandbox network allow/deny rules that leave the global policy untouched.", "recommendation": {"advice": "Run coding agents like Claude Code inside Docker Sandboxes microVMs and scope network allow rules per sandbox, so unlisted hosts return 403 while the global policy stays intact.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/running-docker-sandboxes-on-raspberry-pi-5", "markdown": "https://wpnews.pro/news/running-docker-sandboxes-on-raspberry-pi-5.md", "text": "https://wpnews.pro/news/running-docker-sandboxes-on-raspberry-pi-5.txt", "jsonld": "https://wpnews.pro/news/running-docker-sandboxes-on-raspberry-pi-5.jsonld"}}