Containerization is a Swift package developed by Apple that enables macOS applications to run Linux containers using lightweight virtual machines. The package leverages Apple's Virtualization.framework on Apple silicon hardware and provides a comprehensive set of APIs for container management, image handling, and process execution. Rather than running containers directly on macOS, Containerization executes each Linux container within its own dedicated lightweight virtual machine, achieving sub-second start times through an optimized Linux kernel configuration and minimal root filesystem.
The package provides multiple functional APIs including OCI image management, interaction with remote container registries, ext4 filesystem creation and population, Netlink socket family interaction, optimized Linux kernel creation, lightweight virtual machine spawning with runtime environment management, and containerized process spawning and interaction. The architecture supports running linux/amd64 containers on Apple silicon through Rosetta 2 translation. A key design feature allows clients to create dedicated IP addresses for every container, eliminating the need for individual port forwarding.
Containerization abstracts the virtual machine manager behind protocols with two implementations. The macOS implementation uses Apple's Virtualization.framework directly without requiring extra binaries, representing the primary shipping path on Apple silicon. A Linux backend implementation uses cloud-hypervisor with KVM, controlled through a REST-on-UDS API, with block storage via virtio-blk, shared directories via virtio-fs, and networking via TAP devices. Both backends use vminitd, a lightweight init system subproject that runs as the initial process inside virtual machines and provides a gRPC API over vsock for runtime configuration and process launching.
The repository shows active development and maintenance patterns. GitGenius tracking data reveals a median issue and pull request response latency of zero hours with a mean of 3.3 hours across 129 tracked items, indicating rapid community engagement. The most active issue labels tracked are next with 10 occurrences, network with 9, and storage with 8, suggesting ongoing work on future features, networking capabilities, and storage systems. Primary contributors include dcantah with 185 tracked events, jglogan with 95 events, and dkovba with 39 events. The repository shares overlapping contributors with argoproj/argo-cd, apple/container, and kata-containers/kata-containers projects.
Building Containerization requires a Mac with Apple silicon, macOS 26, and Xcode 26, with older macOS versions explicitly unsupported. The package includes an optimized Linux kernel configuration in a dedicated kernel directory with containerized build environments for easy compilation. Users can provide custom kernels, with testing validated starting from kernel version 6.14.9. Pre-built kernels from the Kata Containers project are supported as alternatives. The cctl executable serves as an example application demonstrating core functionality including OCI image manipulation, container registry authentication, root filesystem creation, and Linux container execution.
The project released version 0.1.0 as its first official release, with earlier versions carrying no source stability guarantees. Source stability is guaranteed only within minor versions, allowing potentially breaking changes between minor version releases. The package is under active development with contributions welcomed through the established CONTRIBUTING.md guidelines. Documentation is available through generated API documentation and a dedicated homepage at apple.github.io/containerization/documentation/, while command-line binaries for running containers are maintained in the separate apple/container repository.