Skip to content

[Request]: macOS inside containers #424

Description

@jbschooley

Feature or enhancement request details

Given that Apple is writing their own containerization framework, it would be great to see the ability to run macOS itself inside a container. CI/CD is so much easier with containers and macOS not supporting being run in a container makes it harder to manage CI/CD processes for mac and iOS apps. I'd love to see that change.

Obviously mac containers would have to run on a mac host and might only run in this container framework but it would be a huge improvement for mac development.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. jershell commented on Aug 5, 2025

    @jershell

    As I understand it, this is some kind of misunderstanding, and either we misunderstood something, or it’s really not possible to create a container with macOS itself?

  2. jbschooley commented on Aug 5, 2025

    @jbschooley
    Author

    As I understand it, this is some kind of misunderstanding, and either we misunderstood something, or it’s really not possible to create a container with macOS itself?

    As far as I know, you can't create a container with macOS itself. There are a few macOS containers on github but those run qemu in a container and a full macOS VM in that. Slow, requires going through OOBE, violates Apple's license so can't use it commercially without consequences.

    What I want is a container inside which I can run macOS software. Mostly xcode builds. Would be a game changer for CI/CD with macOS and iOS development. This currently does not exist, but seems like the next logical step in Apple's official container support.

  3. egernst commented on Aug 7, 2025

    @egernst
    Contributor

    I understand the request, and thanks for opening the issue @jbschooley. I think you are highlighting that there'd be utility in being able to have a container like construct for a macOS based workload. Right?

    Today github.com/apple/containerization and this project focus just on Linux based container workloads.

  4. patriknyblad commented on Aug 27, 2025

    @patriknyblad

    Adding my +1 here, it would be fantastic to run macOS containers so I can run macOS software in a container inside of macOS 😍

  5. jbschooley commented on Sep 3, 2025

    @jbschooley
    Author

    @egernst Yep, this exactly. I've been waiting a long time for the day where I can run macOS/iOS builds in containers just like I can with Windows and Linux builds and not have to worry about cleanup or software updates breaking things on the host.

  6. altaic commented on Sep 3, 2025

    @altaic

    @jbschooley Unless I'm missing something about what you're looking for, virtualizing macOS has been possible for ~5 years via Apple's Virtualization.framework, no qemu or other emulation necessary. It's not lightweight like minimal Linux VMs, but that's because macOS isn't lightweight and the typical container patterns don't really make sense with a full OS. Nevertheless, it's been available and there are several open source projects utilizing it.

    For more info, I recommend Apple's documentation [1] and Howard Oakley [2] has dozens of articles about it (scroll down past the author's own software offerings for a list of articles).

    [1] https://developer.apple.com/documentation/virtualization
    [2] https://eclecticlight.co/virtualisation-on-apple-silicon/

  7. jbschooley commented on Sep 3, 2025

    @jbschooley
    Author

    macOS isn't lightweight and the typical container patterns don't really make sense with a full OS

    Before containers existed this was how things worked with Linux and Windows too. Windows containers still aren't exactly lightweight, but containerization still makes CI with Windows apps so much easier.

    Yes, Apple does have their virtualization framework for full VMs. But say you want to try building your iOS app with a new version of Xcode. You have to create a new VM, manually click through OOBE and set up user accounts, and eventually you get to a terminal and can paste in a script to install everything. Or you copy your existing VM and update Xcode but then you have assets left over from the old version that might cause different behavior than a fresh install would.

    Whereas with a container you could just write a dockerfile to do all that boring stuff. Or you pull from someone else's image that already has it all installed, and all your dockerfile or build script has to do is clone your code into it and build, and maybe pull credentials from secrets or env vars or keychain. macOS or Xcode releases an update, just update version numbers and let it run.

    With Apple developing their own containerization framework, now seems like a great time to join the other platforms in making CI better.

  8. altaic commented on Sep 3, 2025

    @altaic

    Ah that makes sense. Maybe look into MDM workflows for macOS? Apple provides utilities and there are 3rd party ones as well, though I'm not sure how streamlined they are for virtualized instances. I'd be surprised if something doesn't already exist, though.

  9. locked and limited conversation to collaborators on Sep 15, 2025
  10. converted this issue into a discussion #611 on Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions