Switch Docker to use youki as its container runtime to get faster container startup times
Run containers with a more memory-safe alternative to runc in production Linux environments
Study a well-documented OCI runtime implementation when learning how containers work at the OS level
Requires Linux kernel 5.3 or newer, the Rust toolchain, and several system libraries to build from source.
Youki is a container runtime, which is the low-level program that actually creates and runs containers on Linux. When you use Docker or a similar tool, there is a runtime underneath doing the work of setting up isolated processes, file systems, and network environments. Youki is a drop-in replacement for the standard runtime (called runc), but written in Rust rather than Go. The project implements a specification called the OCI runtime spec, which is the industry standard that defines how a container should be created, started, paused, and deleted. Because it follows that spec, youki works with Docker, Podman, and other container tools that expect a compliant runtime. You can point Docker at youki instead of its default runtime and run containers normally. The motivation for writing this in Rust comes down to two things. Container runtimes need to make low-level operating system calls related to process isolation and memory management. Those calls are awkward to handle correctly in Go, the language most container tools use, but more natural in Rust. Rust also provides memory safety guarantees at compile time, which reduces a class of bugs that can appear in systems-level software written in C. Performance benchmarks in the README show youki creating and deleting a container in about 111 milliseconds on average, compared to roughly 224 milliseconds for runc, though a competing runtime called crun clocks in faster at 47 milliseconds. Youki requires Linux with a kernel version of 5.3 or newer. Building it requires Rust and a few system libraries. The README includes a step-by-step tutorial for creating a container from scratch using a busybox base image and a hand-edited configuration file. The project is used in some production environments and has passed end-to-end compatibility tests from the containerd project.
← youki-dev on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.