Code Monkey home page Code Monkey logo

docker-windows-2016-vagrant's Introduction

This is a Docker on Windows Server 2016 Vagrant environment for playing with Windows containers.

Usage

Install the Base Windows Box.

Install the required plugins:

vagrant plugin install vagrant-windows-update
vagrant plugin install vagrant-reload

Then launch the environment:

vagrant up

NB On my machine this takes about 1h to complete... but YMMV!

At the end of the provision the 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 for progress.

The next table describes whether a docker stop --time 600 <container> will graceful shutdown a container that is running a console, gui, or 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:

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'

docker-windows-2016-vagrant's People

Contributors

rgl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.