MacOS - Run a macOS VM on a Linux host with Docker
Sometimes you need a Mac environment without buying another machine. This project packages the QEMU and OpenCore plumbing into a container so a Linux host can boot macOS with KVM acceleration, hand off USB devices, and expose the desktop through a browser or VNC. Installation is hands-off after the recovery image downloads, and environment variables cover disk size, CPU count, memory, and macOS version. It does not ship macOS itself, so Apple licensing still applies and the hardware should be Apple hardware. Expect a long first boot, a generous disk, and a host with virtualization enabled before you start.
Links
- GitHub: https://github.com/dockur/macos
- Docs: https://github.com/dockur/macos/blob/master/docs/environment.md
- Docker Hub: https://hub.docker.com/r/dockurr/macos/
Alternatives
- UTM: A virtual machine app for Macs that also runs other operating systems, but it is meant for desktop use rather than server hosting.
- VirtualBox: A mature desktop hypervisor that is easier to install locally, though macOS guests need more manual setup.
- VMware Workstation: A paid, closed-source desktop hypervisor with polished networking and snapshot tools.
- Proxmox VE: A full virtualization platform for managing many VMs, with more overhead than a single container.