Install And Run IIS Server Inside Windows Container Running On Azure And Docker

In this blog post I’ll show you I Install and run IIS Server Inside Windows Server Container running Windows Server 2016 Core on a Container host hosted In Microsoft Azure.

This post will consolidate a series of new technologies I have been covering here recently like Microsoft Azure, Docker, Windows Containers and Windows Server 2016.

You can also see my post on how to Setup Windows Server containers And Docker On Microsoft Azure – A Step By Step Guide From Scratch

To start the Installation I have my Container host configured and I’m creating a new Windows Container.

Docker run --name core -it windowsservercore

Next, I’m Installing IIS Web Server Inside the container

When done, I’m saving the Windows Container as an Image for future deployment of IIS Servers and I’ll use It In the next step to run my IIS Server:

docker Commit core

You can also commit the Server with a custom name like:

docker commit -m "IIS build" -a "Admin" 4817e943df92 IIS/iis:v1

Once you commit the Image type docker images note the Image ID of the committed Image and run a new docker container using the image noted

This is how I run my new IIS container from the save Image and I’m also opening port 80 for my IIS server

Docker run --name iis -it p 80:80 imageid cmd

Once the container start to run type ipconfig to find the container IP Address, Note it down

Open IE and browse to it

You can hello word page as well

Leave a Reply