GitHub - apple/container: A tool for creating and running Linux containers using lightweight virtual machines on a Mac. It is written in Swift, and optimized for Apple silicon.
Key Points
- 1`container` is an Apple-developed tool for running OCI-compatible Linux containers as lightweight virtual machines on macOS, specifically optimized for Apple silicon.
- 2It leverages new virtualization and networking features in macOS 26, enabling users to pull, run, and push images from standard container registries.
- 3The project is actively developed, with stability guaranteed only within patch versions, and requires a Mac with Apple silicon and macOS 26 for operation.
The container project presents a Swift-written tool designed for creating and executing Linux containers as lightweight virtual machines on macOS, specifically optimized for Apple silicon architectures. This tool functions as an OCI (Open Container Initiative)-compatible client, enabling seamless interaction with standard container registries. Users can pull and run OCI-compliant container images from any registry, and similarly, push self-built images to these registries, ensuring interoperability with other OCI-compatible applications.
The core methodology of container hinges on leveraging Apple's virtualization capabilities on macOS, particularly new features introduced in macOS 26. This allows it to encapsulate Linux environments within lightweight virtual machines, offering a performance-optimized solution for container execution on Apple silicon. The project utilizes the Containerization Swift package for all low-level operations, encompassing container lifecycle management, image handling, and process orchestration. This foundational package abstractly manages the complexities of container and VM interactions, providing the robust underlying framework for container's functionality. The design prioritizes native integration and performance, as indicated by its Swift implementation and Apple silicon optimization.
To operate container, a Mac equipped with Apple silicon is a prerequisite. Furthermore, the tool is explicitly supported only on macOS 26, as it leverages specific enhancements in virtualization and networking introduced in this version. The maintainers do not guarantee support or address issues reproducible on older macOS iterations.
Installation involves downloading a signed installer package from the GitHub release page, followed by a standard macOS package installation procedure which places the tool under /usr/local upon administrator password authentication. The system service is then initiated via container system start. For upgrades or downgrades, users can either manually install a new package or utilize the update-container.sh script located in /usr/local/bin. Prior to any version change, the existing service instance must be stopped using container system stop. Upgrades are performed by executing /usr/local/bin/update-container.sh, while downgrades necessitate an initial uninstallation via /usr/local/bin/uninstall-container.sh -k (to preserve user data) followed by a version-specific installation using . The service must be restarted after the process. Uninstallation is managed by the /usr/local/bin/uninstall-container.sh script, with options to either remove user data alongside the tool (-d flag) or retain it for potential future reinstallation (-k flag).
The container project is currently under active development. As such, stability guarantees, both for its use as a Swift package and the standalone container tool, are strictly limited to patch versions (e.g., between 0.1.1 and 0.1.2). Minor version releases may introduce breaking changes until the project reaches a 1.0.0 release, at which point API and behavior stability are typically expected to increase. Contributions to the project are encouraged, with guidelines provided in the main contributing document.