Docker Community Forums

Share and learn in the Docker community.

How do I start a Windows-Docker-Container on my Mac OS X?

docker

(Andreas Reuter) #1

Hello,

How do I start a Windows-Docker-Container on my Mac OS X. I’m unsure starting Windows-Docker-Container on other base systems than Windows. Could not find any docs related to this topic.

My current understanding:

  • boot2docker hosts Linux-Docker-Container on Windows, Linux and Mac OS X systems e.g. by using virtualbox
  • Windows Server 2016 TP 5 provides some docker tools as a feature package to be installed through the powershell. For this reason a Windows-Docker-Container cannot start on other systems than Windows Server 2016 at this time

I am right, am I not?

Cheers,

Andreas Bauer


(Dvohra) #2

Has the following been referred?
https://docs.docker.com/mac/


(Michael Friis) #3

@theweby it’s a somewhat manual process (also see here).

  1. On OS X, get VirtualBox.
  2. Get Windows Server 2016 Tech Preview 5 ISO (free download from Microsoft)
  3. Create WS 2016 TP5 VM in virtualbox
  4. Run this in the new VM

Now you can run Windows Containers in the VM. To make the setup a little easier to use, see this: Windows Server 2016 TP5 - Docker server remote management


(Andreas Reuter) #4

Thank you! I give a try and reply later. :slight_smile:


(Harrisq) #5

Hi,

Thanks for your helpful post. I have 3 follow-up questions.

A) The link in the last line is no longer functional. Does the resource still exist please?

B) Can your process be extended to run Visual Studio inside a windows docker container on a macOS? If so, is it installing docker inside of the windows VM and Visual studio inside of container? Am totally new to Docker.

C) This is using a Windows preview so it is that you have only 180 days and then your installation becomes inactive and you have to delete it from the VM?

Any assistance gratefully received.


(Michael Friis) #6

Stefan Scherer maintains a bunch of great tools for automating this: https://github.com/StefanScherer/docker-windows-box/


(Stefan Scherer) #7

I use https://github.com/StefanScherer/windows-docker-machine to easily spin up a headless VM on my Mac and switch the Docker API from Docker4Mac and this VM with the docker-machine command.
So you can work from your Mac and create Windows Docker images and run Windows containers in a very convenient way.


(Asbjørn Ulsberg) #8

As I mention here, I’ve been unable to get this working. I’ve also gone down the Packer route, but as that ended up with a 0 byte .vmdk file, I’m now rather stumped.


(Jlundy2) #9

I think the broken link can be found here now: https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server