{"id":15685964,"url":"https://github.com/stefanscherer/windows10-docker-swarm","last_synced_at":"2025-05-07T18:21:31.015Z","repository":{"id":110802592,"uuid":"82343259","full_name":"StefanScherer/windows10-docker-swarm","owner":"StefanScherer","description":"Windows 10 Insider + Docker swarm-mode","archived":false,"fork":false,"pushed_at":"2017-05-06T07:18:30.000Z","size":7489,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T17:06:54.428Z","etag":null,"topics":["docker","docker-swarm","windows-containers","windows10"],"latest_commit_sha":null,"homepage":"https://stefanscherer.github.io/docker-swarm-mode-windows10/","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}},"created_at":"2017-02-17T22:22:15.000Z","updated_at":"2023-09-08T17:21:07.000Z","dependencies_parsed_at":"2023-03-18T05:30:26.727Z","dependency_job_id":null,"html_url":"https://github.com/StefanScherer/windows10-docker-swarm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fwindows10-docker-swarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fwindows10-docker-swarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fwindows10-docker-swarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanScherer%2Fwindows10-docker-swarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefanScherer","download_url":"https://codeload.github.com/StefanScherer/windows10-docker-swarm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931819,"owners_count":21827172,"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","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","docker-swarm","windows-containers","windows10"],"created_at":"2024-10-03T17:33:45.641Z","updated_at":"2025-05-07T18:21:30.952Z","avatar_url":"https://github.com/StefanScherer.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Windows 10 Docker swarm-mode\n\nThis is a local setup using Vagrant with VMware Fusion to demonstrate a Windows 10 Insider Docker swarm-mode.\n\nThis repo is tested with Vagrant 1.9.2 and VMware Fusion Pro 8.5.3. VirtualBox does not work as it doesn't support nested virtualization.\n\n## Get the base box\n\nFirst download the latest [Windows 10 Insider 15042 ISO](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewadvanced), but you need to be registered to the Windows Insider program.\n\nFor the next step you need [Packer](https://packer.io). You have several ways how to install it. The easiest way is to install it via [Homebrew](http://brew.sh/). After you have installed Homebrew. Run the following command when you installed Homebrew:\n```bash\nbrew install packer\n```\nIf you don't have the Vagrant `windows_10_15042` base box you need to create it first with [Packer](https://packer.io). See my [packer-windows](https://github.com/StefanScherer/packer-windows) repo to build the base box.\n\nTo build the base box you have to run these commands on your host machine:\n\n```\ngit clone https://github.com/StefanScherer/packer-windows\ncd packer-windows\npacker build --only=vmware-iso --var iso_url=~/Downloads/Windows10_InsiderPreview_EnterpriseVL_x64_en-us_15042.iso windows_10_insider.json\nvagrant box add windows_10_15042 windows_10_insider_vmware.box\n```\n\n## Vagrant boxes\n\nThere are three VM's with the following internal network and IP addresses:\n\n| VM        | IP address   | Memory |\n|-----------|--------------|--------|\n| sw-win-01 | 192.168.36.2 | 3GB    |\n| sw-win-02 | 192.168.36.3 | 3GB    |\n| sw-win-03 | 192.168.36.4 | 3GB    |\n\nDepending on your host's memory you can spin up one or more Windows 10 VM's.\n\n## Swarm Manager\n\nThe `sw-win-01` is the Swarm manager.\n\n## Swarm worker\n\nThe `sw-win-02` and `sw-win-03` are Swarm workers.\n\n![swarm-mode](images/swarm-mode.png)\n\n## Demo\n\nHave a look at the folder [`demo`](https://github.com/StefanScherer/windows10-docker-swarm/tree/master/demo) with some helper scripts to create a overlay network, a scaled service and a consumer trying to fetch data from this service using the overlay network.\n\n## Example usage\n\nOpen a PowerShell window in the `sw-win-01` machine and create a service\n\n```\nPS C:\\\u003e docker service create --name=whoami stefanscherer/whoami-windows:latest\n```\n\nCheck the service\n\n```\nPS C:\\\u003e docker service ls\nID            NAME    MODE        REPLICAS  IMAGE\neptkxbn1gce5  whoami  replicated  1/1       stefanscherer/whoami-windows:latest\n```\n\nThen scale up the service\n\n```\nPS C:\\\u003e docker service scale whoami=10\nwhoami scaled to 10\nPS C:\\\u003e docker service ls\nID            NAME    MODE        REPLICAS  IMAGE\neptkxbn1gce5  whoami  replicated  6/10      stefanscherer/whoami-windows:latest\nPS C:\\\u003e docker service ls\nID            NAME    MODE        REPLICAS  IMAGE\neptkxbn1gce5  whoami  replicated  6/10      stefanscherer/whoami-windows:latest\nPS C:\\\u003e docker service ls\nID            NAME    MODE        REPLICAS  IMAGE\neptkxbn1gce5  whoami  replicated  10/10     stefanscherer/whoami-windows:latest\n```\n\n## Visualizer\n\nOpen a PowerShell window on the `sw-win-01` machine and run the script\n\n```\nC:\\vagrant\\scripts\\run-visualizer.ps1\n```\n\nNow open a browser to see the visualizer UI. I use the IP address of the manager VM and open a browser on my host machine.\n\n![visualizer](images/visualizer.png)\n\n## Portainer\n\nOpen a PowerShell window on the `sw-win-01` machine and run the script\n\n```\nC:\\vagrant\\scripts\\run-portainer.ps1\n```\n\nNow open a browser to see the Portainer UI. Portainer is started as a Docker service. At the\nmoment you can't use `--publish` on Windows. So we have to pick the IP address of the container\nto open it in a browser. Run the helper script\n\n```\nC:\\vagrant\\scripts\\open-portainer-ui.ps1\n```\n\n![portainer](images/portainer.png)\n\nWith both Visualizer and Portainer you could demonstrate scaling services\n\n![visualizer and portainer](images/visualizer-portainer.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanscherer%2Fwindows10-docker-swarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanscherer%2Fwindows10-docker-swarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanscherer%2Fwindows10-docker-swarm/lists"}