apple/containerization

Containerization is a Swift package for running Linux containers on macOS.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 56 minutes ago
Added to GitGenius on June 21st, 2025
Created on May 29th, 2025
Open Issues & Pull Requests: 74 (+0)
Number of forks: 346
Total Stargazers: 8,897 (+0)
Total Subscribers: 38 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 9.0 hours
Mean response time: 9.5 days
90th percentile: 20.1 days
Tracked items: 136

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 95% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 8% of issues opened in the past year have been closed. Three people close 78% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 39
New in 7 days: 2
Closed in 7 days: 0
Avg open age: 110 days
Stale 30+ days: 29
Stale 90+ days: 20

Recent activity

Opened in 7 days: 2
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 1

Top labels

  • storage (11)
  • next (10)
  • network (9)
  • breaking change (1)
  • good first issue (1)
  • invalid (1)
  • wontfix (1)

Detailed Description

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.

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.