Projects / Container runtime / Before you start
Before you start
This is a Linux project. Containers are built from Linux kernel features, so on macOS or Windows use a Linux virtual machine. Because the runtime needs root, use a machine you can throw away rather than your daily laptop. rt is a teaching tool, not a security boundary: run only programs you trust.
Check that you have a compiler and a recent kernel:
gcc --version
uname -r
Every listing and command in this project was run on Linux 6.18 (x86-64) as root, with gcc and glibc. We use no libraries beyond the C library. Each phase is its own folder (p1, p2, and so on), so an older version stays next to a newer one. The layout is the same in every folder:
rt.c the runtime
build.sh compiles it
mkrootfs.sh builds a small root file system (from Phase 2)
tools/ small test programs that mkrootfs.sh copies in (from Phase 3)
Commands that need root are written with sudo. The output blocks below come from real runs. Where a number depends on your machine, such as a namespace id, we say so.