{"id":15780033,"url":"https://github.com/rgl/docker-windows-2019-vagrant","last_synced_at":"2026-03-14T07:38:29.311Z","repository":{"id":139751488,"uuid":"172374325","full_name":"rgl/docker-windows-2019-vagrant","owner":"rgl","description":"docker on windows playground","archived":false,"fork":false,"pushed_at":"2022-09-09T20:53:40.000Z","size":190,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T11:06:00.078Z","etag":null,"topics":["containers","docker","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-02-24T18:29:41.000Z","updated_at":"2021-10-05T10:18:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"6cb9932d-6e3d-4e09-9c14-091d70dc27f6","html_url":"https://github.com/rgl/docker-windows-2019-vagrant","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/rgl%2Fdocker-windows-2019-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdocker-windows-2019-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdocker-windows-2019-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdocker-windows-2019-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/docker-windows-2019-vagrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243547628,"owners_count":20308743,"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":["containers","docker","windows"],"created_at":"2024-10-04T18:40:24.741Z","updated_at":"2025-10-12T13:09:50.015Z","avatar_url":"https://github.com/rgl.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\r\n\r\nThis is a Docker on Windows Server 2019 (1809) Vagrant environment for playing with Windows containers.\r\n\r\nFor Windows Server 2022 (21H2) see the [rgl/docker-windows-2022-vagrant](https://github.com/rgl/docker-windows-2022-vagrant) repository.\r\n\r\n# Usage\r\n\r\nInstall the [Base Windows Server 2019 Box](https://github.com/rgl/windows-vagrant).\r\n\r\nInstall the required plugins:\r\n\r\n```bash\r\nvagrant plugin install vagrant-reload\r\n```\r\n\r\nThen launch the environment:\r\n\r\n```bash\r\nvagrant up --provider=virtualbox # or --provider=libvirt\r\n```\r\n\r\nAt the end of the provision the [examples](examples/) are run.\r\n\r\nThe Docker Engine API endpoint is available at http://10.0.0.3:2375.\r\n\r\n# Graceful Container Shutdown\r\n\r\n**Windows containers cannot be gracefully shutdown** because they are forcefully terminated after a while. Check the [moby issue 25982](https://github.com/moby/moby/issues/25982) for progress.\r\n\r\nThe next table describes whether a `docker stop --time 600 \u003ccontainer\u003e` will graceful shutdown a container that is running a [console](https://github.com/rgl/graceful-terminating-console-application-windows/), [gui](https://github.com/rgl/graceful-terminating-gui-application-windows/), or [service](https://github.com/rgl/graceful-terminating-windows-service/) app.\r\n\r\n| base image                                | app     | behavior                                                                                     |\r\n| ----------------------------------------- | ------- | -------------------------------------------------------------------------------------------- |\r\n| mcr.microsoft.com/windows/nanoserver:1809 | console | receives the `CTRL_SHUTDOWN_EVENT` notification but is killed after about 5 seconds          |\r\n| mcr.microsoft.com/windows/servercore:1809 | console | receives the `CTRL_SHUTDOWN_EVENT` notification but is killed after about 5 seconds          |\r\n| mcr.microsoft.com/windows:1809            | console | receives the `CTRL_SHUTDOWN_EVENT` notification but is killed after about 5 seconds          |\r\n| mcr.microsoft.com/windows/nanoserver:1809 | service | receives the `SERVICE_CONTROL_PRESHUTDOWN` notification but is killed after about 15 seconds |\r\n| mcr.microsoft.com/windows/servercore:1809 | service | receives the `SERVICE_CONTROL_PRESHUTDOWN` notification but is killed after about 15 seconds |\r\n| mcr.microsoft.com/windows:1809            | service | receives the `SERVICE_CONTROL_PRESHUTDOWN` notification but is killed after about 20 seconds |\r\n| mcr.microsoft.com/windows/nanoserver:1809 | gui     | fails to run because there is no GUI support libraries in the base image                     |\r\n| mcr.microsoft.com/windows/servercore:1809 | gui     | does not receive the shutdown messages `WM_QUERYENDSESSION` or `WM_CLOSE`                    |\r\n| mcr.microsoft.com/windows:1809            | gui     | does not receive the shutdown messages `WM_QUERYENDSESSION` or `WM_CLOSE`                    |\r\n\r\n**NG** setting `WaitToKillServiceTimeout` (e.g. `Set-ItemProperty -Path HKLM:\\SYSTEM\\CurrentControlSet\\Control -Name WaitToKillServiceTimeout -Value '450000'`) does not have any effect on extending the kill service timeout.\r\n\r\n**NB** setting `WaitToKillAppTimeout` (e.g. `New-ItemProperty -Force -Path 'HKU:\\.DEFAULT\\Control Panel\\Desktop' -Name WaitToKillAppTimeout -Value '450000' -PropertyType String`) does not have any effect on extending the kill application timeout.\r\n\r\nYou can launch these example containers from host as:\r\n\r\n```bash\r\nvagrant execute --sudo -c '/vagrant/ps.ps1 examples/graceful-terminating-console-application/run.ps1'\r\nvagrant execute --sudo -c '/vagrant/ps.ps1 examples/graceful-terminating-windows-service/run.ps1'\r\nvagrant execute --sudo -c '/vagrant/ps.ps1 examples/graceful-terminating-gui-application/run.ps1'\r\n```\r\n\r\n# Docker images\r\n\r\nThis environment builds and uses the following images:\r\n\r\n```\r\nREPOSITORY                                 TAG                     IMAGE ID       CREATED             SIZE\r\nbusybox-info                               latest                  2bf5e72aafe4   42 minutes ago      259MB\r\ngo-info                                    latest                  644c8601f5e5   42 minutes ago      260MB\r\ncsharp-info                                latest                  5f4038c15e58   43 minutes ago      331MB\r\npowershell-info                            latest                  558280d991cc   44 minutes ago      554MB\r\nbatch-info                                 latest                  8b94396f136f   45 minutes ago      258MB\r\nbusybox                                    latest                  0b904a5f2d77   45 minutes ago      258MB\r\ngolang                                     1.19.1                  9dd9a279a9a9   45 minutes ago      788MB\r\nmcr.microsoft.com/powershell               7.2-nanoserver-1809     dc1b9f8b1e6d   8 days ago          530MB\r\nmcr.microsoft.com/dotnet/sdk               6.0-nanoserver-1809     187d361065f2   4 weeks ago         1GB\r\nmcr.microsoft.com/dotnet/runtime           6.0-nanoserver-1809     c5415eb49140   4 weeks ago         331MB\r\nmcr.microsoft.com/windows                  1809                    04a0d4a65546   4 weeks ago         15.8GB\r\nmcr.microsoft.com/windows/servercore       1809                    e795f3f8aa80   4 weeks ago         5.6GB\r\nmcr.microsoft.com/windows/nanoserver       1809                    5fa59fbac916   4 weeks ago         258MB\r\n```\r\n\r\n# Troubleshoot\r\n\r\n* Restart the docker daemon in debug mode and watch the logs:\r\n  * set `\"debug\": true` inside the `$env:ProgramData\\docker\\config\\daemon.json` file\r\n  * restart docker with `Restart-Service docker`\r\n  * watch the logs with `Get-EventLog -LogName Application -Source docker -Newest 50`\r\n* For more information see the [Microsoft Troubleshooting guide](https://docs.microsoft.com/en-us/virtualization/windowscontainers/troubleshooting) and the [CleanupContainerHostNetworking](https://github.com/Microsoft/Virtualization-Documentation/tree/live/windows-server-container-tools/CleanupContainerHostNetworking) page.\r\n\r\n# References\r\n\r\n* [Using Insider Container Images](https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/using-insider-container-images)\r\n* [Beyond \\ - the path to Windows and Linux parity in Docker (DockerCon 17)](https://www.youtube.com/watch?v=4ZY_4OeyJsw)\r\n* [The Internals Behind Bringing Docker \u0026 Containers to Windows (DockerCon 16)](https://www.youtube.com/watch?v=85nCF5S8Qok)\r\n* [Introducing the Host Compute Service](https://blogs.technet.microsoft.com/virtualization/2017/01/27/introducing-the-host-compute-service-hcs/)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fdocker-windows-2019-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Fdocker-windows-2019-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fdocker-windows-2019-vagrant/lists"}