HeadlinesBriefing favicon HeadlinesBriefing.com

kern: Fast Rootless Container Runtime

Hacker News •
×

kern is a fast, rootless sandbox and virtual resource runtime designed for any workload, including untrusted and AI-generated code. It delivers a real, kernel-enforced container in approximately 3.5 ms from an OCI image. The tool operates without a daemon, socket, or background process, utilizing just one static binary that is only 1.52 MB in size. Its only Rust dependency is libc, ensuring minimal overhead and rapid startup times.

The runtime provides comprehensive isolation through user, PID, mount, network, UTS, and IPC namespaces, along with deny-by-default seccomp allowlists and cgroup v2 limits. Users can enable hardened security profiles with a single flag. Beyond isolation, kern manages resources like CPU, memory, disk, and devices via configuration files. It supports Docker-compatible stacks, allowing users to run services by name without conversion steps, and includes tools like ps, logs, exec, and a live TUI top command.

While kern is not a hypervisor or a Kubernetes runtime, it leverages the Linux kernel for boundary enforcement. It explicitly targets scenarios where users choose to run untrusted code and own the blast radius, such as agent tool-calls or CI jobs. However, it does not protect against hostile code from strangers on shared kernels. Installation requires a Linux kernel with unprivileged user namespaces and cgroup v2 support, running on Linux, WSL2, or ARM boards.