hello-dresden
A "Hello Docker Meetup Dresden" Web server in a Windows Container
4.3K
This is a sample running a Node.js express app in a Windows Container.
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
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
Content type
Image
Digest
Size
22.9 MB
Last updated
over 8 years ago
docker pull stefanscherer/hello-dresden:0.0.3