Run a disposable macOS VM with Docker using dockur/macos

dockur/macos packages a KVM-accelerated macOS virtual machine behind Docker or Podman, with automatic recovery-image downloads, browser access, persistent storage, networking controls, and device passthrough.

The useful part

What you get from it

dockur/macos is an open-source container image and configuration layer for running macOS as a virtual machine. Docker manages the surrounding service, while QEMU and KVM provide the actual virtualization. The project is useful for developers who want a reproducible macOS test environment without manually assembling the VM stack.

What it provides

  • Automatic download of macOS installation files
  • A browser-based viewer on port 8006 plus optional VNC access
  • KVM acceleration for near-native virtualization performance
  • Persistent virtual-disk storage through a mounted volume
  • Configurable CPU, RAM, disk size, display resolution, networking, and audio
  • First/last-mile features such as host-folder sharing, USB passthrough, disk passthrough, macvlan/macvtap networking, and memory ballooning
  • Docker Compose, Docker CLI, Kubernetes, and GitHub Codespaces entry points

The repository currently documents macOS 11 through 15 as selectable versions. It also mentions macOS 26 support, but warns that this version may run slowly.

Requirements and tradeoffs

The host needs KVM access, an AVX2-capable processor, at least 4 GB of available RAM, and at least 64 GB of free disk space. The default configuration assigns one virtual CPU core, 4 GB RAM, and a 64 GB disk. Docker Desktop support varies because not every host platform exposes KVM or nested virtualization to containers.

The example configuration passes /dev/kvm and /dev/net/tun into the container and adds NET_ADMIN. Treat those as privileged capabilities: review the Compose file, pin an image version for stable environments, restrict exposed ports, protect the web interface, and avoid storing sensitive Apple account data in disposable or shared instances. The project has not been independently tested by LinkLoot.

Important licensing boundary

The repository code is MIT-licensed, but macOS remains governed by Apple's software license. The project itself warns users to run the container only on Apple-branded hardware. Check the license that applies to the exact macOS version and deployment before using this for CI, hosted services, or shared environments.

Good evaluation use cases

  • Browser or application compatibility checks on a temporary macOS environment
  • Reproducible development and QA machines on suitable Apple hardware
  • Testing install flows, automation, networking, or device passthrough
  • Disposable labs where rebuilding is preferable to maintaining a long-lived desktop

Start with the repository's Compose example, verify KVM availability first, and keep the VM isolated until networking, credentials, storage, and licensing have been reviewed.

Community

Discussion

Share practical experience, questions, or warnings with the community.

0

Sign in to join the discussion and vote on comments.

No comments yet. Start the discussion.
Keep exploring

More from this topic

More in Tools & Apps