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.
- ALSO READHOW TO: Dual Boot macOS and Linux
- ALSO READHOW TO: Install macOS Big Sur With OpenCore on Linux
Download PuTTY For MacOS. First, install the PuTTY than you can run PuTTYgen on Mac. From the top menu, go to Finder and opt for Go → utilities. Then search the terminal, which supports SSH connections to remote servers. Various multiples options are available to install PuTTY, which is Mac Port. The command-line option can install it. Here’s how you can create it. Make sure the USB drive is at least 8GB in size, and nothing else is stored on it. Download the macOS Catalina installation file using this link. Turn off the Mac and then insert the bootable USB drive. Now turn the Mac back on while holding the Option key. It will take you to the boot menu where you can select.
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.
Install Putty On Mac Catalina Free
Install Putty On Mac Catalina Os
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.