Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rgl/docker-windows-2016-vagrant
a Docker on Windows Server 2016 Vagrant environment for playing with Windows containers
https://github.com/rgl/docker-windows-2016-vagrant
containers docker vagrant windows
Last synced: about 1 month ago
JSON representation
a Docker on Windows Server 2016 Vagrant environment for playing with Windows containers
- Host: GitHub
- URL: https://github.com/rgl/docker-windows-2016-vagrant
- Owner: rgl
- Created: 2017-04-16T19:43:56.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-12T19:33:10.000Z (over 7 years ago)
- Last Synced: 2024-10-04T18:40:40.974Z (4 months ago)
- Topics: containers, docker, vagrant, windows
- Language: PowerShell
- Size: 55.7 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a Docker on Windows Server 2016 Vagrant environment for playing with Windows containers.
# Usage
Install the [Base Windows Box](https://github.com/rgl/windows-2016-vagrant).
Install the required plugins:
```bash
vagrant plugin install vagrant-windows-update
vagrant plugin install vagrant-reload
```Then launch the environment:
```bash
vagrant up
```**NB** On my machine this takes about 1h to complete... but YMMV!
At the end of the provision the [examples](examples/) are run.
# Graceful Container Shutdown
**Windows containers cannot be gracefully shutdown,** either there is no shutdown notification or they are forcefully terminated after a while. Check the [moby issue 25982](https://github.com/moby/moby/issues/25982) for progress.
The next table describes whether a `docker stop --time 600 ` 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.
| base image | app | behaviour |
| ----------------- | ------- | ---------------------------------------------------------------------- |
| nanoserver | console | does not receive the shutdown notification |
| windowsservercore | console | receives the shutdown notification but is killed after about 5 seconds |
| nanoserver | gui | fails to run `RegisterClass` (there's no GUI support in nano) |
| windowsservercore | gui | receives the shutdown notification but is killed after about 5 seconds |
| nanoserver | service | only receives the **pre** shutdown notification but is killed after about 195 seconds |
| windowsservercore | service | only receives the **pre** shutdown notification but is killed after about 195 seconds |**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.
You can launch these example containers from host as:
```bash
vagrant execute -c '/vagrant/ps.ps1 examples/graceful-terminating-console-application/run.ps1'
vagrant execute -c '/vagrant/ps.ps1 examples/graceful-terminating-gui-application/run.ps1'
vagrant execute -c '/vagrant/ps.ps1 examples/graceful-terminating-windows-service/run.ps1'
```