2

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?

2 Answers 2

1

I can confirm that running Docker on Mac works just fine, but according to this ServerFault question, it's not possible to just run MacOS in Docker.

(You might be able to run MacOS in a VM in a Docker container, but that's probably not what you want.)

You could purchase a MacMini, use it as a Jenkins slave and run automated tests on it as part of your build pipeline or something like that?

0

Back in the day I attended a meetup and they had a Mac Mini for testing Apple related stuff.

At my previous job we had docker images and these were run on Linux, Mac and Windows. The Windows docker environments were less stable, but it worked well on Linux and Mac. All developers were using a Mac and they used docker on a daily basis.

In conclusion, from a cost and DevOps perspective I would prefer using docker over using a Mac Mini as the mac mini will not be used in production will the same docker image should be used in dev, test, acc and prod (DTAP).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.