Support Docker for Desktop on macOS images

Description of the feature request

I would like to run docker within the macOS images. Ideally, Docker for Desktop would be pre-installed on those images. Alternatively, the images would be set up in such a way that I can install Docker for Desktop without running into permission issues.

Use case / for what or how I would use it

I would like to run end to end tests on Bitrise. Currently, our mobile app tests run against mocked data. To run true end to end tests we want to spin up a dockerised version of our database, backend and api that we can interact with from the same server as the one that is running our tests.

Have you tried …

I have spent the last few weeks trying different ways to get docker running on macOS images. The solutions offered in other topics are sadly no longer working:

  • On Catalina images, I can install docker-machine and virtualbox, but the most basic machine create command fails to establish an ssh connection. I’ve attempted to solve this with Bitrise support but we found no solution. The exact same setup works fine on Github Actions. Since docker-machine has been deprecated, it is also not the preferred solution for the long term.

  • On Big Sur images, installing virtualbox does not work at all, since it needs escalated privileges for the Oracle software to run and these cannot be granted without GUI interaction.

  • Docker for Desktop is the preferred tool, but it runs into the same issue of requiring GUI interaction during installation. This can be worked around by making use of the PrivilegedHelperTools directory, but sadly we don’t seem to have access to that on the macOS images.