{"id":15090854,"url":"https://github.com/stefanscherer/docker-windows-box","last_synced_at":"2025-10-05T20:52:51.768Z","repository":{"id":30360994,"uuid":"33913496","full_name":"StefanScherer/docker-windows-box","owner":"StefanScherer","description":"Various Vagrant envs with Windows 2019/10 and Docker, Swarm mode, LCOW, WSL2, ...","archived":false,"fork":false,"pushed_at":"2024-05-23T13:31:36.000Z","size":18689,"stargazers_count":597,"open_issues_count":1,"forks_count":106,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-05-24T05:08:27.568Z","etag":null,"topics":["docker-engine","docker-machine","docker-swarm","lcow","vagrant","vagrantfile","windows-containers","wsl2"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StefanScherer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-14T05:55:35.000Z","updated_at":"2025-04-28T18:55:38.000Z","dependencies_parsed_at":"2024-08-01T16:41:45.722Z","dependency_job_id":"a95fdcf3-af5b-4439-a459-6227c7979739","html_url":"https://github.com/StefanScherer/docker-windows-box","commit_stats":{"total_commits":268,"total_committers":7,"mean_commits":"38.285714285714285","dds":0.02985074626865669,"last_synced_commit":"7286283e1a6a2082c926a08cf78439132fce739d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/StefanScherer/docker-windows-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fdocker-windows-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fdocker-windows-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fdocker-windows-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fdocker-windows-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefanScherer","download_url":"https://codeload.github.com/StefanScherer/docker-windows-box/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fdocker-windows-box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278518904,"owners_count":26000177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-engine","docker-machine","docker-swarm","lcow","vagrant","vagrantfile","windows-containers","wsl2"],"created_at":"2024-09-25T10:34:23.224Z","updated_at":"2025-10-05T20:52:51.720Z","avatar_url":"https://github.com/StefanScherer.png","language":"PowerShell","readme":"# docker-windows-box\n\nThis repo is a collection of various Vagrant environments to work with Windows Containers on a Windows Server 2019 or Windows 10 VM.\n\nThere are different Vagrantfiles for each scenario:\n\n* `Vagrantfile` - Windows Server 2019 and Docker 18.09.0\n* WSL 2\n  * [`wsl2/server/Vagrantfile`](wsl2/server/README.md) - Windows Server Core, version 2004 with WSL 2\n  * [`wsl2/windows10/Vagrantfile`](wsl2/windows10/README.md) - Windows 10, version 2004 with WSL 2\n* [`lcow/Vagrantfile`](lcow/README.md) - Windows 10 with nightly Docker and LCOW enabled\n* [`nano/Vagrantfile`](nano/README.md) - Test setup to have Docker engine installed in a Windows Nanoserver VM\n* [`swarm-demo/Vagrantfile`](swarm-demo/README.md) - some Windows Server 2016 VM's in classical Docker Swarm\n* [`swarm-mode/Vagrantfile`](swarm-mode/README.md) - some Windows Server 2016 VM's in Docker Swarm-mode and overlay network\n* [`windows10/Vagrantfile`](windows10/README.md) - Windows 10 1809 and nightly Docker to test process isolation\n* docker-machine test environments\n  * [`docker-machine/Vagrantfile`](docker-machine/README.md) - Windows 10 with `docker-machine` installed to test with VMware Workstation\n  * [`docker-machine-fusion/Vagrantfile`](docker-machine-fusion/README.md) - macOS 10.13 with `docker-machine` installed to test with VMware Fusion\n\n## Introduction\n\nThis repo has started with a single Vagrantfile that is explained below. As you can see there are several interesting setups here as well in the sub folders.\n\nHave a look at my blog posts how to [Setup a local Windows 2016 TP5 Docker VM](https://stefanscherer.github.io/setup-local-windows-2016-tp5-docker-vm/) and [Adding Hyper-V support to 2016 TP5 Docker VM](https://stefanscherer.github.io/adding-hyper-v-support-to-2016-tp5-docker-vm/) for more details. I also can recommend a more up to date guide [Getting started with Windows Containers](http://glennsarti.github.io/blog/getting-started-with-windows-containers/) by [@glennsarti](https://github.com/glennsarti)\n\n![](images/server2016.png)\n\nAfter provisioning the box has the following tools installed:\n\n* Windows Server 2019 with Docker Engine 18.09.0 and client\n* docker-machine 0.16.0\n* docker-compose 1.23.0\n* (Docker Tab completion for PowerShell (posh-docker))\n* Chocolatey\n* Git command line\n* Git Tab completion for PowerShell (posh-git)\n* SSH client\n\nOptionally you can create a Hyper-V Docker Linux machine and have a multi architecture experience in one VM.\n\nTested with Vagrant 2.1.2, VMware Fusion Pro 10.1.3 on a MacBookPro with Retina display. The Vagrant box will be started in fullscreen mode also with Retina support.\n\nYou can learn and play a lot of scenarios with it:\n\n![](images/docker-windows-box.png)\n\nFuture work will be a Docker Swarm with both Linux and Windows Docker Engines...\n\n## Get the base box\n\nFirst register to [evaluate Windows 2019](https://www.microsoft.com/evalcenter/evaluate-windows-server-2019), but you don't need to download the ISO manually.\n\nThe Vagrant base box is available in Vagrant Cloud https://app.vagrantup.com/StefanScherer, these are all eval versions of Windows Server 2019 or Windows 10.\n\nVagrant will download the base box if it's not available locally, a `vagrant box list` shows which boxes you already have downloaded.\n\n## Install Vagrant reload plugin\n\nAs we need to reboot the VM once during the provisioning, you will need an additional Vagrant plugin\n\n```bash\nvagrant plugin install vagrant-reload\n```\n\n## Spin up the box\n\nTo start the VM with [Vagrant](https://vagrantup.com) run this command\n\n```bash\nvagrant up\n```\n\nYou only have to logout and login once to have the Docker tools in user vagrant's PATH.\n\n## Create some Windows Docker Container images\n\nYou may clone my [dockerfiles-windows](https://github.com/StefanScherer/dockerfiles-windows) repo and create some container images.\n\n```\ngit clone https://github.com/StefanScherer/dockerfiles-windows\ncd dockerfiles-windows\ncd node\n.\\build.ps1\n```\n\n## Test the nightly Windows Docker Engine\n\nYou can update the Docker Engine with the script\n\n```\nC:\\update-container-host.ps1\n```\n\nThis will stop the Docker service, download the nightly build from https://master.dockerproject.org and restart the service.\n\n## Create a Linux Docker machine in Hyper-V\n\nIf you want to try out multi architecture you also use `docker-machine` to create a Linux Docker Engine running in Hyper-V.\nI have prepared a script that will set up everything as there are some known issues.\n\n```\nC:\\vagrant\\scripts\\create-hyperv-linux-docker-machine.ps1\n```\n\nThis PowerShell script creates a Docker machine and updates Docker Engine to the latest so that the Windows Docker client is able to communicate with the Linux Docker Engine.\n\n### Use the Linux Docker machine\n\nOpen a PowerShell terminal as an administrator and select the Linux Docker machine with\n\n```\ndocker-machine env --shell powershell | iex\n```\n\nNow run your first busybox container with\n\n```\ndocker run -it busybox uname -a\n```\n\n## Windows Docker Swarm demo\n\nSee subdirectory [swarm-demo](swarm-demo/README.md)\n\n## Use Vagrant to control your box\n\nFrom your host control your Vagrant box with the usual Vagrant workflow:\n\n* vagrant up\n* vagrant halt\n* vagrant destroy -f\n* vagrant snap take\n* vagrant snap rollback\n* ...\n\nWriting the installation script for the Hyper-V Docker machine the snapshot functions helped me a lot to test the script again and again.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanscherer%2Fdocker-windows-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanscherer%2Fdocker-windows-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanscherer%2Fdocker-windows-box/lists"}