Docker-OSX, Part Two

Docker-OSX, Part Two
Photo by Uriel Soberanes / Unsplash

Install Dependencies

Steps performed on desktop via Docker Desktop for Windows

  • I check the option in General to Use the WSL2 based engine
  • In Resources I go to WSL Integration and check Enable integration with my default WSL distro

Steps performed on desktop via Windows Subsystem for Linux

  • sudo apt install x11-apps -y

So it says to use the video output option of WSLg. To do so it says to change the following two lines in the docker command:

-e "DISPLAY=${DISPLAY:-:0.0}" \
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \

The original command is:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:latest

# docker build -t docker-osx .

So this would mean I change it to:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:latest

# docker build -t docker-osx .

I test this command. The image downloaded and is booting apparently. There's an Apple logo. It has loaded up the macOS Recovery Program. Following the instructions it says to now do the following:

Steps performed on Docker-OSX container on desktop

  • Click Disk Utility
  • I erase the BIGGEST disk. DO NOT MODIFY THE SMALLER DISKS
    • The largest disk is listed as QEMU HARDDISK 274.88GB which I delete
      The next step says to click Reinstall macOS but of course that isn't on the Disk Utilities screen.
  • I close Disk Utility
  • From here I can click Reinstall macOS
  • I click Continue
  • I select the empty disk I just erased.

And it is installing macOS. Once the installation is finished I have a shiny macOS machine running. After some fiddling I am able to get it online, but I run into some problems with authenticating in iMessage. It just won't let me. I can authenticate to iCloud and Facetime, but not iMessage. How weird, you have to love Apple's little quirks. There's no error messages or logs in macOS to work with to fix it because "It just works." Except when it doesn't. Then Apple's answer is always to uninstall and reinstall. Fine. I'll deal with that tomorrow. I think I made enough progress for today.