Virtualization
OSX (macOS) inside a Docker container
Use OSX (macOS) inside a Docker container with Macfleet Clouddockur/macos is an open-source project that allows you to run macOS inside a Docker container with KVM acceleration and a web-based viewer.
Key Features
- KVM Acceleration: Hardware-accelerated virtualization for better performance
- Web-based Viewer: Access macOS through your web browser on port 8006
- Automatic Download: Automatically downloads macOS installation files
- Multiple Versions: Support for macOS 11 (Big Sur) through 15 (Sequoia)
- Easy Setup: Simple Docker Compose configuration
Supported macOS Versions
Version | Name | Status |
---|---|---|
15 | Sequoia | Beta |
14 | Sonoma | Stable |
13 | Ventura | Stable |
12 | Monterey | Stable |
11 | Big Sur | Stable |
Quick Start
Docker Compose Setup
services:
macos:
image: dockurr/macos
container_name: macos
environment:
VERSION: "14"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 5900:5900/tcp
- 5900:5900/udp
volumes:
- ./macos:/storage
restart: always
stop_grace_period: 2m
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" \
--stop-timeout 120 \
dockurr/macos
Configuration Options
System Resources
environment:
RAM_SIZE: "8G"
CPU_CORES: "4"
DISK_SIZE: "256G"
Network Configuration
environment:
DHCP: "Y"
devices:
- /dev/vhost-net
Use Cases
- Development: Test macOS applications without physical hardware
- CI/CD: Run macOS builds in containerized environments
- Testing: Validate software across different macOS versions
- Education: Learn about macOS in isolated environments
System Requirements
- Linux host with KVM support
- Docker or Podman
- Sufficient RAM (minimum 4GB recommended)
- Storage space for macOS installation
Legal Considerations
⚠️ Important: This project is legal as it contains only open-source code and doesn't distribute copyrighted material. However, Apple's EULA requires macOS to run only on Apple hardware. Use responsibly and in compliance with Apple's terms.
Why Use dockur/macos?
- Cost-effective: No need for physical Mac hardware for testing
- Scalable: Deploy multiple macOS instances as needed
- Portable: Containerized approach makes it easy to manage
- Automated: Streamlined setup and configuration process
Perfect for developers who need macOS access for testing, development, or CI/CD pipelines without investing in physical Apple hardware.
Apple silicon as-a-Service
Discover why Macfleet is the preferred cloud provider for developers.