Setting up a Windows Docker Container on MacOS

A few days ago, I came upon Stefan Sherer's github post on how to setup a Docker Container under OSX.

While the process did work overall, there are some things which needed to be downloaded that were not covered.

So here are the steps I used to setup a Windows docker container under MacOS 14.3.1 Intel running OpenCore Legacy Patcher.

There are (2) to build the VM under vagant

  1. VMware Fusion version 12 (I was not able to get this working with VMware Fusion version 13)
  2. VirtualBox version 6.2 (higher versions do not work)

 

Installation

Download an install the following:

https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.dmg
(if you are building VM under Vmware)

https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_x86_64.dmg

Clone Stefan's REPO in Terminal:

$ git clone https://github.com/StefanScherer/windows-docker-machine

-----

# if you building under VMware
$ vagrant plugin install vagrant-vmware-desktop

$ vagrant up --provider vmware_desktop 2019-box

----

# if you are building under VirtualBox

$ vagrant plugin install virtualbox

$ vagrant up --provider virtualbox 2019-box

----

# start the container

$ docker run -d -it -p 8080:8080 mcr.microsoft.com/windows/servercore:ltsc2019 --name windows-container

# open command.exe inside container

$ docker exec -it windows-container cmd.exe