opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

macOS inside a Docker container.
GitHub RepoImpressions709

Project Description

View on GitHub

Run macOS in a Docker Container with dockur/macos

Why This is Interesting

Ever wanted to spin up a macOS VM quickly without dealing with complex setup or licensing headaches? The dockur/macos project lets you run macOS inside a Docker container—complete with KVM acceleration, a web-based viewer, and automatic macOS image downloads.

While Apple’s EULA restricts macOS to Apple hardware, this project is a fascinating technical experiment for developers who want to test macOS in isolated environments (on compliant hardware, of course).

What It Does

dockur/macos is an open-source Docker image that virtualizes macOS using QEMU/KVM. It supports multiple macOS versions (from Big Sur to the latest Sequoia beta) and provides:

  • Web-based VNC viewer (accessible via browser)
  • Automatic macOS installer downloads (no manual ISO handling)
  • Hardware passthrough (USB, disks, GPU acceleration)
  • Customizable resources (CPU cores, RAM, disk size)

Why It’s Cool

  1. No Complex Setup – Just docker run and you get a full macOS VM.
  2. Cross-Platform – Works on Linux, Windows (WSL2), and macOS (with nested virtualization).
  3. Isolated Testing – Perfect for CI/CD, cross-platform dev, or safe macOS experimentation.
  4. KVM Performance – Near-native speed thanks to hardware acceleration.

How to Try It

Quick Start (Docker CLI):

docker run -it --rm --name macos \
  -p 8006:8006 \
  --device=/dev/kvm \
  --device=/dev/net/tun \
  --cap-add NET_ADMIN \
  -v "$PWD/macos:/storage" \
  dockurr/macos

Then open http://localhost:8006 to access the macOS installer.

Docker Compose Example:

services:
  macos:
    image: dockurr/macos
    environment:
      VERSION: "14"  # Sonoma
      DISK_SIZE: "128G"
    devices:
      - /dev/kvm
      - /dev/net/tun
    ports:
      - 8006:8006
    volumes:
      - ./macos-data:/storage

Final Thoughts

This project is a clever hack for developers who need macOS in disposable environments—think testing Safari-specific web features or debugging macOS apps. That said:

✅ Pros: Fast setup, good performance, no manual ISO juggling.
⚠ Caveats: Apple’s EULA restricts usage to Apple hardware, and newer macOS versions (like Sequoia) may have quirks.

If you’re on Apple hardware and want a quick macOS VM, give it a spin. Just don’t expect miracles on non-Apple hosts (legally or technically).

GitHub Repo: dockur/macos
License: MIT (but macOS itself remains proprietary).

Would you use this for testing? Let me know in the comments! 🚀

@GithubProjects I need it for my nextjs landing page

Back to Projects
Project ID: 1941434809546571958Last updated: July 5, 2025 at 12:02 PM