Deploying a Simple Windows Container in Azure

Posted by Brian Keyes

Apr 13, 2017 9:35:42 AM Docker, Docker Containers, Azure, windows containers

With the release of Windows Server 2016, Microsoft has expanded its integration with Docker to include running Docker Windows Containers.  As I mentioned in my previous article, this now means that there we can now run both Docker FOR Windows and Docker ON Windows.

There are several prerequisites for installing Docker for Windows. Fortunately, Microsoft Azure already has a Windows Server 2016 with a containers template that will satisfy those requirements for you. We will go through an exercise to demonstrate what a general implementation of Docker for Windows would look like if you elected to use Azure for your computing needs.

We will start by logging into the Azure Portal and searching for the compute resource “Windows Server 2016 – with containers”.

Windows with contianers.jpg

                                     Figure 1 Search for "Windows server with containers" in Azure


We then establish this Windows Server instance and connect to it via RDP. 


 Figure 2 select your new virtual machine and connect to download the RDP object


At this point, we can pull down our first Docker Windows Container by executing - "docker run microsoft/dotnet-samples:dotnetapp-nanoserver". Then use PowerShell to pull and run this demonstration container. Be aware that Docker Windows Containers are much larger than the typical Linux container.


docker run .jpg

Figure 3 ------------------ be patient!


When this image is downloaded, extracted, and is run, you will see a sample result of a .NET application. The Dotnet-bot!.



Figure 4 – result of .Net sample


In line with the default container behavior, the container terminates when it has accomplished what it needs to do. Whenever the process that the container was launched with terminates, the container instance will also terminate. However, the underlying image still exists in the image cache.


To see the container image, we can run “docker images” at the PowerShell prompt to see all the images that are locally stored on your instance and take note of the size!  


Figure 4 the image you just pulled 1GB !


If we were to run this again, it would be much faster as the image already exists in the local image cache and does not need to be puilled from the remote image repository.

Now you have just run a basic Docker Windows Container on Windows 2016 in Azure! Stay tuned for more articles on Docker Windows Containers in the near future.  


Subscribe to the Vizuri Blog


Posted by Brian Keyes

Brian has over 20 years of experience as a Systems Engineer with a strong background in VMware, storage, networking and security. Brian has worked for variety of US Govt. entities over the years;DOD,NGA,NNSA and others. Currently focused on Docker technologies

Find me on:


Posts by Topic

see all
Request a Complimentary Docker Consultation

An Open View

Vizuri Blog

Subscribing to our blog is a great way to stay up to date with the latest information from Vizuri, as well as our strategic partners. We focus on providing a range of content that is practically useful and relevant from both a technical and business perspective.

We promise to respect your privacy.