Skip to content

OS · tsbox

Build tsbox, a small container CLI that works like podman: no daemon, no root. Run it inside podman machine for real isolation, or with the process-only driver on macOS.

# Lesson
1 Bun.spawn, stdio and exit codes
2 Signals: SIGINT, SIGTERM, graceful shutdown
3 tsbox pull: an OCI registry over HTTP, with hand-written manifest decoders
4 tsbox run: overlayfs, unshare, chroot, rootless user namespaces
5 cgroups v2 limits by writing files
6 The per-container monitor and its Unix socket
7 tsbox ps, logs, stop: a JSON-RPC protocol as a discriminated union
8 Two isolation drivers behind one interface

Every exercise runs in your own project with bun test, and every test passes on macOS: the Linux-only parts are pure functions you test anywhere, and each Linux lesson ends with commands to run it for real inside podman machine.