As part of the CI setup, I'd like to run (automated) tests on native macOS GUI software in a 'safe environment' (i.e. without messing with the host software installation too much). Virtual machines (using VirtualBox) work in principle, but they are fairly slow to start/stop and VirtualBox on macOS hosts doesn't seem to be very stable (it works great on Linux hosts though).
After reading macOS testing on Desktop: Docker containers vs. Homebrew installation I learned that using Docker works great for testing software on macOS. However, my understanding is that even with Docker Desktop for Mac (which uses Hyperkit to virtualize the OS as opposed to running VMs using VirtualBox), the software running in the container sees a Linux installation.
Would it be plausible to use Docker anyway (maybe I misunderstood it?) such that the containerized program sees a macOS installation or would some other solution (A plain chroot
?) work better here?