HOW TO: Install macOS Catalina in a Docker Container on Linux

We already have a tutorial on how to install macOS Catalina on Linux. A simple tutorial on how set up a macOS VM in QEMU, accelerated by KVM. This is basically the same tutorial but everything runs, near native with X11 forwarding, in Docker.

This is not a Docker tutorial, but let’s have a quick look at how to install it on Arch linux ( more info for Docker on Arch here ). For other distros as well as how to install Docker on macOS and Windows, check out the official installation guide here.


1. Open up the terminal and type sudo pacman -S docker


2. Once Docker is installed type in sudo systemctl start docker and sudo systemctl enable docker



3.  By default only a user with root or sudo privilages can run or manage Docker. If you want to run Docker without root or having to add sudo every single time type sudo usermod -aG docker $USER



4. Reboot your machine



Install macOS in a Docker container

1. Make sure you have hardware virtualization turned on in BIOS

2. Install QEMU and requirements on the machine. Open up a terminal and type:

  • Arch: sudo pacman -S qemu libvirt dnsmasq virt-manager bridge-utils flex bison ebtables edk2-ovmf
  • Debian/Ubuntu: sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
  • CentOS/Rhel/Fedora: sudo yum install libvirt qemu-kvm -y


3. Now, run:
sudo systemctl enable libvirtd.service
sudo systemctl enable virtlogd.service
sudo modprobe kvm



4. Reboot your machine

5. Now pull the image with docker pull sickcodes/docker-osx


6. Run docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx


7.  Boot from macOS Base System


8.  Now the macOS installer will load. Select Disk Utility and format the largest disk in the list.


9. Exit Disk Utility and and select Reinstall macOS


10. On restart, select macOS to continue the installation.


11. When the installation is finished, upon reboot select macOS to boot into macOS Catalina


12. That’s it finish setting up macOS Catalina and enjoy running macOS in a Docker container on your Linux machine.

To troubleshoot the installation as well as learn how to customize the build ( more RAM, more/less disk space, macOS version etc ) check out the project page here.



We don't think that using an adblocker = piracy. That's simply not true. We use and recommend uBlock Origin.

However, as a small non-corporate website, we would appreciate it if you'd consider whitelisting FSM in your adblock of choice.

Alternatively, consider donating using the options below....

Monero (XMR) 43GnqUNJrTi9QyL7kEH8vM8pgWGCE6bjv1FSRipeNMM4TTeNnUVsRBb6MfMpQYxtLE7ReonxVVSXz2rFCEdW5H11LC3x73b
Bitcoin (BTC) 1Hfuq77gKKFJeNcq4EP4dQK3yDRWrFEwJR
Bitcoin Cash (BCH) qzmdm6e6q5wf2p6sxz2mst7cenz60newwc5m4e9js8
Ether (ETH) 0x5f02869278C24A6579d3820f52AD15936D6F9d69
More content?  
Ads Blocker Image Powered by Code Help Pro

Congrats on using an adblocker. We mean it.

Please support us by disabling your AdBlocker or whitelist us.

Thank you! ❤️