How can I run a docker windows container on osx?

I know I am late to the party but as of 2021, this is the easiest setup to get a windows container running on macOS:

https://github.com/StefanScherer/windows-docker-machine

  1. Install vagrant and virtual box
  2. Clone the repository above and change directory into it
  3. vagrant up --provider virtualbox 2019-box
  4. docker context use 2019-box

I followed this setup and I could use the following windows image

mcr.microsoft.com/windows/servercore:ltsc2019

Please note that the windows version of your host must match the container image. This is mentioned here: https://hub.docker.com/_/microsoft-windows

Windows requires the host OS version to match the container OS
version. If you want to run a container based on a newer Windows
build, make sure you have an equivalent host build.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)