Public Repository

Last pushed: a year ago
Short Description
A "Hello Docker Meetup Dresden" Web server in a Windows Container
Full Description

This is a sample running a Node.js express app in a Windows Container.

Windows Server 2016 TP5

Sourcecode sample taken from https://github.com/plossys/nodetraining/tree/master/06-express

Added just a simple oneliner Dockerfile with Docker ONBUILD feature:

FROM stefanscherer/node-windows:4-onbuild

Changed some code to print "Hello Docker Meetup Dresden" and created the Docker Image with

docker build -t express .

Then tagged and pushed to the Docker Hub

docker tag express:latest stefanscherer/hello-dresden:latest
docker push stefanscherer/hello-dresden:latest

You can run this Container with this command

docker run -p 8080:3000 -d --name=express stefanscherer/hello-dresden

To open the web page you must use the container's IP address as you can't connect from your container host to the container right now. Otherwise use the IP address of your container host if you want to connect from outside of your container host.

start http://$(docker inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' express):3000

Windows 10 Insider 14325

Running this in a Hyper-V container is very similar:

FROM stefanscherer/node-windows:4-nano-onbuild

Changed some code to print "Hello Docker Meetup Dresden" and created the Docker Image with

docker build --isolation=hyperv -t express .

Then tagged and pushed to the Docker Hub

docker tag express:latest stefanscherer/hello-dresden:nano
docker push stefanscherer/hello-dresden:nano

You can run this Container with this command

docker run --isolation=hyperv -p 8080:3000 -d --name=express stefanscherer/hello-dresden:nano

To open the web page you must use the container's IP address as you can't connect from your container host to the container right now. Otherwise use the IP address of your container host if you want to connect from outside of your container host.

start http://$(docker inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' express):3000
Docker Pull Command
Owner
stefanscherer

Comments (0)