explaingit

sickcodes/docker-osx

52,505ShellAudience · developerComplexity · 4/5QuietLicenseSetup · hard

TLDR

Run macOS inside a Docker container on Linux using KVM and QEMU virtualization, enabling security research and CI/CD testing without Apple hardware.

Mindmap

mindmap
  root((docker-osx))
    What it does
      Runs macOS in Docker
      Uses KVM virtualization
      Forwards display via X11
    Supported versions
      Catalina to Sequoia
      Tahoe latest
    Use cases
      Security research
      CI/CD pipelines
      Vulnerability testing
    Tech stack
      Shell scripting
      Docker containers
      QEMU emulator
      KVM hardware virt
    Requirements
      Linux host machine
      KVM BIOS enabled
      Docker installed

Things people build with this

USE CASE 1

Test macOS-specific security vulnerabilities and conduct automated security analysis on Linux machines.

USE CASE 2

Run CI/CD pipelines that build and test macOS software without owning physical Apple hardware.

USE CASE 3

Investigate macOS services like iMessage in a reproducible, scriptable environment for research.

USE CASE 4

Develop and debug macOS applications on Linux hosts with near-native performance.

Tech stack

ShellDockerQEMUKVMX11

Getting it running

Difficulty · hard Time to first run · 1day+

Requires KVM-capable Linux host, nested virtualization setup, large disk space for macOS image, and complex QEMU/Docker configuration.

Use it freely, but any project you distribute that includes this code must also be GPL-licensed and open source.

In plain English

Docker-OSX is a project that lets you run Apple's macOS operating system inside a Docker container on a Linux host. Docker is a tool that normally packages and runs Linux applications in isolated environments called containers, but running macOS, which Apple restricts to Apple hardware, in this way is an unusual feat that Docker-OSX makes possible. Under the hood, it uses KVM (Kernel-based Virtual Machine), which is Linux's built-in hardware virtualization system, and QEMU, an emulator. KVM allows the CPU to run the virtual machine at near-native speed rather than fully emulating every instruction, which is why the project advertises "near-native performance." The macOS graphical interface is forwarded to your Linux screen using a technology called X11 Forwarding, which streams the display output over a network socket. The whole setup is wrapped in a Docker container so it can be started with a single command. Supported macOS versions include Catalina, Big Sur, Monterey, Ventura, Sonoma, Sequoia, and Tahoe, each available as a different Docker image tag. The primary use case highlighted in the README is security research: running macOS in a reproducible, scriptable environment so that researchers on Linux or Windows machines can test macOS-specific vulnerabilities, conduct automated security analysis pipelines, or investigate services like iMessage. It is also used for CI/CD pipelines, automated build and test systems, that need to test macOS software without owning Apple hardware. This is a technically complex tool aimed at developers and security researchers comfortable with the Linux command line and Docker. It requires a Linux host with KVM hardware virtualization support enabled in the BIOS. The tech stack is primarily Shell scripting, Docker, QEMU, and KVM. The project builds on top of the OSX-KVM open-source project.

Copy-paste prompts

Prompt 1
How do I set up docker-osx to run macOS Sonoma in a Docker container on my Linux machine?
Prompt 2
Show me how to use docker-osx to automate security testing of macOS vulnerabilities in a CI/CD pipeline.
Prompt 3
What are the hardware requirements and BIOS settings needed to run docker-osx with KVM?
Prompt 4
How do I forward the macOS graphical interface to my Linux display using docker-osx's X11 forwarding?
Prompt 5
Can I use docker-osx to test iMessage or other macOS services on a Linux host?
Open on GitHub → Explain another repo

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