Running IIS in Windows Docker Container in Amazon EC2

Windows Server 2016 Technical Preview 5 was released on 27th April 2016 & it’s well known by now that it supports docker with it’s windows server containers. Microsoft also started uploading windows server core with various application as docker images to docker hub.

I was wondering whether it’s possible to run Windows 2016 TP5 on an EC2 instance and launch a windows container inside the EC2 instance. EC2 officially supports only upto Windows 2012 R2 and I couldn’t find any 2016 AMI’s in Ireland region. Hence I decided to install Windows 2016 TP5 on local VirtualBox, upload it to S3 create AMI out of it and launch the EC2 instance.

Downloaded the ISO from the Technet – Windows Server Evaluations, using the iso as boot image launch a VM and install Windows in it. Next step is to install the container feature, base container images, install docker and configure it. Quick Start guide in MSDN site clearly explains all the required step. I performed Scripted – Existing System setup without HyperV option since I don’t want to do each steps one by one.

Install and configure docker

Shutdown the VM and export it as OVA file as shown below.

Upload the OVA file to a S3 bucket.

After the file got uploaded successfully import it as image to create the AMI.


At this moment I was not sure whether the import image would be successful.

Checked the status of the task frequently to see how it goes.

Once the AMI got created, launched an EC2 instance and was able to login successfully using the credentials that I configured in the VirtualBox image.

Pull IIS docker image from docker hub

Launch the IIS windows container by invoking docker run

Hurray!! Welcome screen of IIS in windows container in Amazon EC2.


Let’s create a new file to check how it goes.


This gives a hope that it will be available on EC2 not long after it goes GA.

1 Comment

 Add your comment
  1. Sanjeevi Mahalingam

    Ultimate one Prakash!!!!

Leave a Comment

Your email address will not be published.