
close
close
In today’s Ask the Admin, I’ll show you how to quickly set up Windows Server 2016 Technical Preview 3 (TP3) in Azure and deploy containers using Docker.
Unless you’ve been living under a rock for the past couple of years, it’s likely you’ll have heard of Docker and containers. Docker is a system for managing containers, a technology that’s long been native to Linux and is now included in Windows Server 2016 TP3. Nonetheless, if you need a bit of refresher, see What is Docker? and Are Docker Containers Better than VMs? on the Petri IT Knowledgebase.
advertisment
As it stands in the current technical preview, Windows Server containers can be managed using PowerShell or Docker, but it’s worth noting that containers created with Docker can’t be managed using PowerShell, and vice versa. Just as in Linux, Windows Server containers can be managed natively, and for more information on that see Aidan Finn’s series of articles Managing Windows Server Containers with PowerShell.
For the purposes of this demo, we’re going to use Windows Server 2016 TP3 in a virtual machine (VM) running in the Azure cloud because Microsoft has a preconfigured image where the Containers role and Docker agent are preinstalled with the necessary configuration steps already performed, meaning we can get down to the nitty gritty much quicker.
If you want to set up your own containers host on a local server, instead of using the preconfigured Azure VM, you can download and run the following script on a virtual host running Windows Server 2016 TP3 to configure a VM, replacing myVM with the name of the new VM and password with the password for the VM’s administrator account.
Deploy a Windows Server Containers Host in Azure
I’m not going to perform a complete walkthrough of this step in this article as you can find detailed instructions on how to deploy a VM using the Azure preview portal in an upcoming article titled, Deploy a VM using Azure Resource Manager. All you need to do is select the Windows Server Container Preview image and deploy the VM with the default settings. Alternatively, you can use the Azure management portal to deploy a VM using the classic model, i.e. in a cloud service. For more information on using the Azure management portal to deploy VMs, see Deploy Windows Server 2012 in an Azure Virtual Machine on Petri.Create a New Container from an Image
Log in to your Windows Server container host, no matter how you deployed it, using the local administrator account. In the Azure VM, you only have access to the command prompt. If you deployed full Windows Server yourself, you'll need to open a command prompt and then follow the instructions below:
List the available Docker images (Image Credit: Russell Smith)
The –it parameter specifies an interactive session, and cmd launches access to the new container via a command prompt.
Start and connect to a Docker container (Image Credit: Russell Smith)
Create a new image from a container using Docker (Image Credit: Russell Smith)
Delete containers and images using Docker (Image Credit: Russell Smith)
advertisment
More from Russell Smith
advertisment
Petri Newsletters
Whether it’s Security or Cloud Computing, we have the know-how for you. Sign up for our newsletters here.
advertisment
More in Virtualization
Microsoft Lifts Windows 11 Update Block As Oracle Releases VirtualBox Fix
Mar 14, 2022 | Rabia Noureen
Most popular on petri
Log in to save content to your profile.
Article saved!
Access saved content from your profile page. View Saved
Join The Conversation
Create a free account today to participate in forum conversations, comment on posts and more.
Copyright ©2019 BWW Media Group