For a project for learning containers from first principles, the first results are p8952/bocker, binpash/try and containerd/containerd (Containerd is a production-grade container runtime used in orchestrators like Kubernetes, not a minimal educational implementation; it's the real thing rather than a tutorial showing how to build one from scratch). rkt/rkt and containers/bubblewrap round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
Explore open-source projects and educational resources for building custom container runtimes from the ground up.
Bocker is a minimal container management tool written in Bash that implements core container functionality using Linux namespaces and control groups. It serves as a Linux container manager capable of starting and managing isolated processes and images through low-level kernel features. The project includes an OCI image tool for pulling, saving, and building container images compatible with industry standards. It further integrates a cgroup resource controller to restrict CPU and memory consumption for isolated processes. The tool covers the full container lifecycle, including process isolati
Bocker is a minimal container runtime written in Bash that uses Linux namespaces and cgroups to isolate and manage processes, and includes OCI image pulling — it fits your DIY educational project goal even though it uses Shell (not Go/Rust) and doesn't explicitly cover overlayfs or pivot_root.
Try is a tool for managing ephemeral shell environments and running commands within an isolated sandbox. It utilizes OverlayFS and Linux namespaces to prevent processes from altering the live system, acting as both a command sandbox and a filesystem change auditor. The project allows users to capture file modifications in a temporary layer and inspect those changes before deciding to apply or dispose of them. It supports a workflow of auditing additions and modifications, then merging verified changes back into the host filesystem. The tool provides capabilities for interactive sandbox shell
Try is a sandboxing tool that uses OverlayFS and Linux namespaces to create isolated shell environments, but it does not implement cgroups, image pulling, layer management, or a run/exec CLI in Go or Rust, so it is not a DIY container runtime from scratch for educational purposes.
Containerd is a daemon-based container runtime that manages the complete lifecycle of containers on a host system. It functions as a core orchestration backend, handling image distribution, storage, and process execution while adhering to industry-standard specifications for container execution and configuration. The project is distinguished by its modular, plugin-based architecture, which allows for the extension of storage, runtime, and networking capabilities without requiring a full daemon recompile. It utilizes a shim-based execution model to delegate low-level operations, ensuring isola
Containerd is a production-grade container runtime used in orchestrators like Kubernetes, not a minimal educational implementation; it's the real thing rather than a tutorial showing how to build one from scratch.
rkt is a pod-native container engine and runtime for Linux that executes containerized applications as isolated pods. It serves as an OCI container runtime and a Linux container manager, supporting the execution of images based on Open Container Initiative, appc, and Docker specifications. The project distinguishes itself by offering hardware-level container isolation, allowing pods to run within virtual machines using KVM or QEMU for a dedicated kernel. It further separates itself through secure container deployment practices, utilizing SELinux mandatory access control and TPM-backed integri
rkt is a production-ready container engine and runtime, not a minimal educational project that teaches how to build one from scratch, so while it covers the same underlying technologies, it does not serve as the step-by-step DIY implementation tutorial you are looking for.
Bubblewrap is a Linux sandbox runner that creates lightweight, isolated execution environments for running untrusted applications. It combines Linux user, mount, network, PID, and UTS namespaces with seccomp-BPF system call filtering to restrict filesystem, network, process, and inter-process communication access. The project provides comprehensive process isolation by giving each sandbox its own private tmpfs root with selective bind-mounts, a separate network stack containing only a loopback interface, an independent process ID space, and remapped user and group identifiers. It applies secc
Bubblewrap is a pre-built Linux sandbox runner that uses namespaces for isolation, but it is not a DIY container runtime implementation from scratch—it lacks cgroups, overlayfs, image pulling, layer management, and a run/exec CLI for containers, and is written in C rather than the requested Go or Rust.
Skopeo is an OCI container image manager and registry client designed for inspecting, copying, and signing container images across different registries and storage backends. It enables the manipulation of container images using direct API calls to registries, operating independently of a local container daemon or runtime. The tool provides specialized capabilities for container image mirroring and synchronization, specifically supporting the mirroring of external repositories to internal registries for air-gapped environments. It also functions as a container image signing tool, allowing for
Skopeo is a container image management tool for inspecting and copying images, not a tutorial or project that builds a container runtime from scratch using namespaces and cgroups.
proot-distro is a rootless container runtime and Linux distribution manager that allows users to install and run isolated guest environments without requiring administrative root privileges. It utilizes PRoot to simulate root access and filesystem redirection, enabling the deployment of full Linux distributions in a non-root space. The project functions as an OCI container image handler, capable of building, pulling, and pushing OCI-compatible images and manifests. It further serves as a cross-architecture execution layer, utilizing user-mode emulation to run binaries and containers built for
proot-distro is a rootless container environment builder that runs under Termux, but it uses PRoot (not Linux namespaces or cgroups) and is a ready‑to‑install tool rather than an educational project that builds minimal Docker internals from scratch.
CRIU is a Linux process checkpointing tool and state manager used to freeze running applications and save their memory and state to disk for later restoration. It functions as a container migration engine and an OCI checkpoint image converter, allowing the live state of running containers to be transferred between different hosts. The project distinguishes itself through its ability to persist network connectivity, acting as a TCP connection state persister that saves and reconstructs network socket states to maintain active communication after a restart. It further enables the distribution o
CRIU is a checkpoint/restore tool for running containers, not a DIY implementation that demonstrates building a container runtime from scratch with namespaces, cgroups, or overlayfs.
microsandbox is a platform that runs untrusted code inside hardware-isolated microVMs, each with its own kernel, filesystem, and network stack. It boots directly from standard OCI container images, supports copy-on-write filesystem layers, and integrates with AI agents to execute tool calls and generated code in isolated environments with secret protection. What sets microsandbox apart is its host-side network proxy that enforces firewall rules, intercepts DNS, inspects TLS traffic, and injects secrets at the network boundary without exposing them inside the VM. It provides SSH access to micr
Microsandbox is a hardware-isolated microVM platform that runs container images, not a minimal DIY container runtime demonstrating Linux namespaces, cgroups, and overlayfs from scratch for educational purposes.
Microsandbox is a runtime for creating and managing lightweight, hardware-isolated virtual machines — called sandboxes — that boot directly from standard OCI container images. Each sandbox runs as its own host process with a separate kernel, filesystem, and network stack, providing process-per-sandbox isolation. The project includes a command-line tool and multi-language SDKs (Rust, TypeScript, Python, Go) for programmatic lifecycle control, and it communicates with sandbox agents over Unix sockets using a CBOR-encoded protocol. What distinguishes Microsandbox is its combination of host-manag
Microsandbox runs hardware-isolated virtual machines from OCI images rather than implementing a container runtime with Linux namespaces and cgroups, so it doesn't demonstrate the core educational path you're looking for.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| p8952/bocker | 12.7K | Shell | GPL-3.0 | |
| binpash/try | 5.4K | Shell | MIT | |
| containerd/containerd |
| 20.4K |
| Go |
| apache-2.0 |
| rkt/rkt | 8.8K | Go | Apache-2.0 |
| containers/bubblewrap | 5.8K | C | other |
| containers/skopeo | 11K | Go | Apache-2.0 |
| termux/proot-distro | 2.8K | Shell | gpl-3.0 |
| checkpoint-restore/criu | 3.7K | C | other |
| zerocore-ai/microsandbox | 4.8K | Rust | apache-2.0 |
| superradcompany/microsandbox | 6.6K | Rust | Apache-2.0 |