explaingit

dockur/macos

📈 Trending19,963ShellAudience · developerComplexity · 4/5ActiveLicenseSetup · hard

TLDR

Run a full macOS desktop inside a Docker container on Linux, accessible via web browser or VNC. Configure CPU, RAM, and disk through environment variables.

Mindmap

mindmap
  root((repo))
    What it does
      macOS in Docker
      KVM virtualization
      Web browser access
    Setup
      Docker Compose
      Choose OS version
      Configure resources
    Use cases
      Test on macOS
      CI automation
      No Apple hardware
    Advanced features
      USB passthrough
      File sharing
      Network config
    Requirements
      Linux host
      KVM support
      Docker installed

Things people build with this

USE CASE 1

Test your software on macOS without owning a Mac or Apple hardware.

USE CASE 2

Automate macOS-specific tasks in CI/CD pipelines on Linux infrastructure.

USE CASE 3

Run macOS applications and development tools on a Linux server accessible via web browser.

USE CASE 4

Debug and verify cross-platform compatibility for apps targeting both Linux and macOS.

Tech stack

DockerDocker ComposeKVMShellVNC

Getting it running

Difficulty · hard Time to first run · 1h+

Requires KVM support on host Linux system and nested virtualization capabilities; macOS licensing restrictions may apply.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

This project lets you run macOS inside a Docker container on a Linux host. Docker is a tool for running isolated software environments called containers; normally containers run Linux software. This project uses KVM (Kernel-based Virtual Machine), a hardware virtualization feature built into Linux, to run macOS as a virtual machine inside a container. The result is a fully functional macOS desktop that you access through a web browser on port 8006 or via VNC. Setup is done through Docker Compose or a Docker CLI command, you specify which macOS version you want (Sequoia 15, Sonoma 14, Ventura 13, Monterey 12, or Big Sur 11), and the container automatically downloads the installer and walks you through the installation steps in your browser. Disk size, CPU cores, and RAM are all configurable through environment variables. The default is 64 GB of disk space, one CPU core, and 4 GB of RAM; these can be increased to suit your needs. More advanced configurations are covered in the FAQ: giving the container its own IP address using Docker's macvlan networking, passing physical USB devices or hard drives through to macOS, sharing files between the container and the host filesystem, and enabling DHCP so macOS appears on your local network like any other device. This is useful for developers on Linux who need to test software against macOS, automate macOS-specific tasks in a CI pipeline, or run macOS software without owning Apple hardware. KVM support is required, meaning it works on Linux hosts with compatible CPUs but not on macOS or most Windows systems. The project is written in Shell.

Copy-paste prompts

Prompt 1
How do I set up macOS Sonoma in Docker using this project? Walk me through the Docker Compose configuration.
Prompt 2
Show me how to increase the CPU cores and RAM allocated to the macOS container beyond the defaults.
Prompt 3
How do I pass a USB device or external hard drive through to macOS running in this Docker container?
Prompt 4
What's the difference between accessing macOS via the web browser on port 8006 versus VNC, and which should I use?
Prompt 5
How do I configure the macOS container to get its own IP address on my local network using macvlan?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.