Windows Containers in Azure

It has been a while after last blog post, but there has been reason for it. We have been fully working with new products and now we would like to share some great new stuff.
This blog post will contain step by step guide to install Windows Server 2016 Core with Containers Tech Preview 4 to Azure. We will also install Windows Container with IIS and show how to use NAT module for networking. Refer MS container documentation for more details.

First we need to login Azure and create Container Host:
Container001

Of course we are using Resource Manager Model
Container002

Add name and select correct Resource Group and choose VM Size:
Container003

Select Virtual Network and all other needed parameters:
Container004

As we want to secure connections we are using Network Security Group (NSG). We will enable RDP connection to host and also HTTP traffic for connection IIS on container. Refer MS Article for more details of NSG.
After these selections you can start to install container host:
Container005

After provisioning is done, connect container host and enable PS Remoting:
Container006

Container007

As I´m going to manage Container Host from another VM which is in same virtual network I need to add it as trusted host, because I´m not using domain. So I will login to my management VM and add Container Host IP as trusted host:

Container008

Next I will connect to my Container host:


Container009
Container010Container011

As I´m using HTTP traffic on my container I will need to add firewall rule for it:

Container012

Next we will create NAT Switch for the containers. Check MS article for more information regarding Container networking:

Container013

And then we need to create the Network Address Translation Object:

Container014

We are going to install IIS on Container so we need to allow HTTP traffic from the host:

Container016

As we used Windows Server 2016 Core with Containers Tech Preview 4 we already have Windows Server Core image:

Container015

Let´s start creating Container:

Container017

and then Start earlier created Container:

Container018

Connect Container:

Container019

Check container IP and write it down as we will need it later on:
Container020

Next we´ll install IIS on container:

Container021

Now we have basic IIS up and running so we can disconnect from container.
Container022

Next we need to add port mapping for the HTTP traffic:
add port mapping for Website:

Container023

alright, all done. Check from Azure Portal container Host public IP address and then test http traffic for example from you own computer:
Container024

Leave a Reply

Your email address will not be published. Required fields are marked *