apple

    apple/container

    #307 this week

    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.

    ios
    Swift
    Apache-2.0
    49.0K stars
    1.7K forks
    49.0K GitHub watchers
    Updated 8/16/2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Use Cases & Benefits

    • Container is a Swift-based tool for creating and running Linux containers as lightweight VMs on Apple silicon Macs.
    • It supports OCI-compatible container images, enabling interoperability with standard container registries and tools.
    • Optimized for macOS 26 and Apple silicon, it leverages new virtualization and networking features but lacks support for older macOS versions.
    • Organizations can use it to develop, test, and deploy containerized Linux applications natively on Mac hardware with Apple silicon.
    • Ideal for developers needing efficient container workflows on Macs, especially those targeting Apple silicon and requiring OCI image compatibility.

    About container

    container

    container is a tool that you can use to create and run Linux containers as lightweight virtual machines on your Mac. It's written in Swift, and optimized for Apple silicon.

    The tool consumes and produces OCI-compatible container images, so you can pull and run images from any standard container registry. You can push images that you build to those registries as well, and run the images in any other OCI-compatible application.

    container uses the Containerization Swift package for low level container, image, and process management.

    introductory movie showing some basic commands

    Get started

    Requirements

    You need a Mac with Apple silicon to run container. To build it, see the BUILDING document.

    container is supported on macOS 26, since it takes advantage of new features and enhancements to virtualization and networking in this release. We do not support older versions of macOS and the container maintainers typically will not address issues that cannot be reproduced on the latest macOS 26 beta.

    Install or upgrade

    If you're upgrading, first stop and uninstall your existing container (the -k flag keeps your user data, while -d removes it):

    container system stop
    uninstall-container.sh -k
    

    Download the latest signed installer package for container from the GitHub release page.

    To install the tool, double-click the package file and follow the instructions. Enter your administrator password when prompted, to give the installer permission to place the installed files under /usr/local.

    Start the system service with:

    container system start
    

    Uninstall

    Use the uninstall-container.sh script to remove container from your system. To remove your user data along with the tool, run:

    uninstall-container.sh -d
    

    To retain your user data so that it is available should you reinstall later, run:

    uninstall-container.sh -k
    

    Next steps

    Contributing

    Contributions to container are welcomed and encouraged. Please see our main contributing guide for more information.

    Project Status

    The container project is currently under active development. Its stability, both for consuming the project as a Swift package and the container tool, is only guaranteed within patch versions, such as between 0.1.1 and 0.1.2. Minor version number releases may include breaking changes until we achieve a 1.0.0 release.

    Discover Repositories

    Search across tracked repositories by name or description