<p>There are some fundamental misunderstandings in your bullets which makes your question unclear:</p>

<ol>
<li>Apple will not allow you to develop/build using a virtual system.  I believe this is a legal constraint.  That said, you can run pretty much anything in VirtualBox as long as you have a legally provided image (e.g. a Linux image).</li>
<li>You can only run the Windows base images if you are running <a href="https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers" rel="nofollow noreferrer">Windows Containers</a> which will be incompatible with MacOS systems.  If you want to build on MacOS using Docker you will need to use Linux containers.</li>
</ol>

<p>However, you can run your continuous-integration runners across Windows and Mac.  This is one of the major benefits of implementing runners in Docker for your CI tool.  Now if you have agents on Windows, MacOS, or even Linux, you can get a consistent build experience by using Docker. <a href="https://docs.gitlab.com/runner/install/docker.html" rel="nofollow noreferrer">This</a> official GitLab article has more about setting this up.</p>

CC BY-SA 4.0
2019-10-02T06:33:46.327Z
You answered my question even if it was poorly phrased - thanks for that. Putting it another way - I only have Linux machines - can I build/test my software on MacOSX and Windows through Docker? The answer from the above seems to be No!
Paulo Matos
CC BY-SA 4.0
2019-10-02T13:58:49.673Z
@PauloMatos Correct.  However, you can build/test software on MacOSX and Windows using Docker linux containers for a consistent CI experience.
Wesley Rolnick
CC BY-SA 4.0
2019-10-03T10:30:50.977Z
Now I am confused - You seemed to misunderstand at I need the software to CI on MacOSX and Windows using only Linux runners - i.e. with Linux host and MacOSX or Win10 as Guests. That doesn't seem to be possible due to your previous clarification.
Paulo Matos
CC BY-SA 4.0
2019-10-01T15:57:34.660Z
2019-10-01T15:57:34.660Z
Wesley Rolnick
<p>I am deploying CI with several runners - however they are all based on the Docker executor on Linux. Is it possible to use Linux runners to test applications on Windows or Mac instead?</p>

<p>I understand I could use the VirtualBox executor and have a MacOS/Windows image, however I fail to understand if it is possible to do this without acquiring a license for MacOS or Windows (maybe there are free images for CI available?)</p>

<p>My actual initial question was geared towards running Windows/MacOS images inside a docker container on Windows - is it possible? I assume it isn't because we are still using the Linux kernel but would like confirmation.  </p>

<docker><continuous-integration><windows><gitlab-ci-runner><macos>
Cross-CI on Windows and Mac
Paulo Matos
# Cross-CI on Windows and Mac

(Asked by: username_0 on 2019-10-01)

I am deploying CI with several runners - however they are all based on the Docker executor on Linux. Is it possible to use Linux runners to test applications on Windows or Mac instead?

I understand I could use the VirtualBox executor and have a MacOS/Windows image, however I fail to understand if it is possible to do this without acquiring a license for MacOS or Windows (maybe there are free images for CI available?)

My actual initial question was geared towards running Windows/MacOS images inside a docker container on Windows - is it possible? I assume it isn't because we are still using the Linux kernel but would like confirmation.

**Tags:** docker, continuous-integration, windows, gitlab-ci-runner, macos


---

## 1 answers

### Answer by username_1 on 2019-10-01. Score: 1 | Accepted answer

There are some fundamental misunderstandings in your bullets which makes your question unclear:

1. Apple will not allow you to develop/build using a virtual system. I believe this is a legal constraint. That said, you can run pretty much anything in VirtualBox as long as you have a legally provided image (e.g. a Linux image).
2. You can only run the Windows base images if you are running [Windows Containers](https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers) which will be incompatible with MacOS systems. If you want to build on MacOS using Docker you will need to use Linux containers.

However, you can run your continuous-integration runners across Windows and Mac. This is one of the major benefits of implementing runners in Docker for your CI tool. Now if you have agents on Windows, MacOS, or even Linux, you can get a consistent build experience by using Docker. [This](https://docs.gitlab.com/runner/install/docker.html) official GitLab article has more about setting this up.

> **Comments:**
> **username_0**: You answered my question even if it was poorly phrased - thanks for that. Putting it another way - I only have Linux machines - can I build/test my software on MacOSX and Windows through Docker? The answer from the above seems to be No!  
> **username_1**: @PauloMatos Correct.  However, you can build/test software on MacOSX and Windows using Docker linux containers for a consistent CI experience.  
> **username_0**: Now I am confused - You seemed to misunderstand at I need the software to CI on MacOSX and Windows using only Linux runners - i.e. with Linux host and MacOSX or Win10 as Guests. That doesn't seem to be possible due to your previous clarification.  

---

