Install
Four binaries: corail, coraild, recify and sonar.
Linux, one line
$ curl -fsS https://www.coraild.com/install | bash
The release archives hold static builds of all four. Read the script before you pipe it to a shell.
Build from source
You need Zig 0.16 (the version is pinned in build.zig.zon) and just.
$ git clone git@github.com:dbrrt/zocker.git && cd zocker $ just build # zig build -Doptimize=ReleaseFast $ ls zig-out/bin corail coraild recify sonar
Put the four binaries in one directory on your PATH. sonar looks for corail next to itself first.
$ corail version corail 0.0.1 (unknown)
Rootless prerequisites
corail run needs no sudo. It needs a Linux kernel with user namespaces, cgroup v2 and overlayfs, plus newuidmap and newgidmap (the uidmap package) and an entry for your user in /etc/subuid and /etc/subgid. Most distributions set this up for normal users.
Resource limits (--memory, --cpus, --pids-limit) need a delegated cgroup subtree. Where there is none, the container still runs, without limits.
Ubuntu 23.10 and later: AppArmor
Without subuid ranges, corail maps only your own uid, and Ubuntu 23.10+ (kernel.apparmor_restrict_unprivileged_userns=1) blocks that. If you skip the step below, corail run exits 1 and prints this first line, followed by the three ways out:
corail: cannot create a usable user namespace (EPERM).
The fix is one time and needs sudo:
$ just install-apparmor installing AppArmor profile for /path/to/zig-out/bin/corail done โ corail now runs rootless
The profile attaches to that exact binary path. Run it again if you move the binary. It carries only the userns, rule.
macOS
On Intel and Silicon Macs corail runs the Linux engine in a microVM, and recify up starts the control plane in a Linux guest. Install from the same archives; see Introduction for how it works.
Check it works
$ corail run --rm alpine -- echo hi hi
The first run pulls alpine. Next: run a container.