Docker-OSX

Launch macOS virtual machines inside Docker containers. Get near-native KVM performance for CI/CD, security research, and cross-platform development on any host.

Run a complete macOS virtual machine directly within a Docker container. This project leverages QEMU and KVM to deliver near-native performance, making it possible to operate a responsive macOS environment on Linux and Windows (via WSL2) hosts. It is a versatile tool for developers, security researchers, and teams that need an accessible and disposable macOS instance.

This solution offers a wide range of capabilities to fit various workflows:

  • Cross-Platform Operation: Use familiar Docker commands to manage a macOS VM on your existing Linux or Windows machine.
  • High Performance: Get a smooth desktop experience thanks to KVM hardware acceleration.
  • Broad macOS Version Support: Run numerous versions, including Catalina, Big Sur, Monterey, Ventura, and Sonoma.
  • CI/CD Pipeline Ready: Easily integrate into automated testing and build systems for macOS or iOS applications.
  • Advanced Use Cases: Conduct security research with features like iMessage access and iPhone USB passthrough.
  • Flexible Access: Interact with your VM through a direct graphical interface (X11 forwarding), or run it headlessly with SSH, VNC, or SPICE access.

Directory Structure

docker-osx
shared
.env
docker-compose.yml

docker-compose.yml

services:
  docker-osx:
    image: sickcodes/docker-osx:latest
    container_name: docker-osx
    devices:
      - /dev/kvm:/dev/kvm
    ports:
      - "50922:10022"
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
      - ./shared:/mnt/shared
    environment:
      - DISPLAY=${DISPLAY:-:0.0}
      - MAC_ADDRESS=${MAC_ADDRESS}
    stdin_open: true
    tty: true

.env

DISPLAY=:0.0
MAC_ADDRESS=52:54:00:11:22:33
Categories:

Share:

Ad
Favicon

 

  
 

Similar to Docker-OSX

Favicon

 

  
  
Favicon

 

  
  
Favicon