If you are accustomed to building and managing applications in virtual machines (VMs) getting started with containers can be a daunting proposition. Containers offer a different approach to package and instantiate your workloads along with benefits, such as faster startup and better resource utilization. For a developer, tools like Visual Studio and Visual Studio Code are filled with add-ons to package the application being developed into a container. However, up until now ITPros have been left to their luck on how to modernize their applications, and more importantly, how to take the leap from VMs to containers.
Today we are pleased to announce an update to the containers extension within Windows Admin Center to address that. Windows Admin Center has become the number one tool that Windows admins have come to love and use on their day to day activities. The containers extension has been providing a great experience for troubleshooting containers running on your container host, such as opening a console connection to a container, checking logs, monitoring resource consumption, and more. However, it does assume you have everything in place and already running. With the new functionalities introduced today, we are enabling Windows admins, Ops, and IT operators to easily get started with Windows containers and containerize their first application. Let’s take a look at these new possibilities:
How to get the new functionality
The new functionalities are being made available for Windows Admin Center under a new Insiders extension feed. If you don’t have Windows Admin Center installed, you can download it from here. While the new feed is for Insiders, you don’t need the Insiders build of Windows Admin Center.
After installing Windows Admin Center, you can add the new Insiders feed by going to Settings>Extensions>Feeds and add the new feed “https://aka.ms/wac-insiders-feed”:
Once you have added the new feed, you will be able to see the new Containers extension available under Available extensions. You can now go ahead and install the extension to enable the new functionality.
Notice that the Containers extension will only show up under Server Manager and if you are targeting an existing container Host. For more information on how to install Docker on Windows Server, check out our documentation.
Pulling container images
Your journey with Windows containers will most likely start by pulling containers images to your container host. These images might be on Docker Hub where we host base images, such as Server Core, Nano Server, and many others. In addition, other images you might need may require you to log into that container registry. With this update, Windows Admin Center makes it easier to pull container images:
All the information needed to pull an image is there. If you have to authenticate to pull the image and you can do that and we’ll also store that information for future use.
Spinning up a new container
If you have a container image ready to go, you can now start a new container from Windows Admin Center. Simply select the container image and click Run:
Once the required information is specified, you can fire up a new container. Here you have the option to select which isolation mode you want to use, which ports to open, and memory and CPU allocation. However, you are not limited to that. The “Add” option gives you the ability to add other “docker run” parameters, such as specify environment variables, persistent storage, and much more.
Creating new container images
Probably one of the most complex concepts to grasp, creating new container images requires you to write a docker file with the instructions on how to build a container image. There are virtually an infinitude number of ways to write a docker file, but here we want to make the process as simple as possible for Windows admins who just want to take an application and put it on a container image.
In this first update to the Containers extension we are limiting the type of applications you can containerize to IIS Web Applications. While we plan to add more options in the future, we do want to hear customer feedback on how we’re doing on this, what can be improved for the existing options, and what are the applications they want to containerize.
There are a few options and scenarios we are enabling in this first update:
- Static Web Applications: A static application running on IIS that is not dependent on any framework.
- ASP.Net applications: ASP.Net applications can be containerized using the ASP.Net container images. As part of this process we will look for the Visual Studio solution to map which projects you want to containerize.
- Existing dockerfiles: If you have a docker file ready, you can use this tool to rebuild your container image. This is especially useful when you need to rebuild the container image because of a change in the application, or because you want to update the base container image.
- PowerShell script: If your application requires any other additional configuration and you already have a PowerShell script to take care of that, you can add that to your dockerfile and container image.
An important aspect of this tool is that the dockerfile has a preview at the bottom, allowing you to see the changes to it as you pass on the configuration of your application. This will allow you to learn how the dockerfile is built for future usage.
As you build the container image using Windows Admin Center, we will store the dockerfile in the same place your application resides. You can then use this dockerfile for other purposes - even integrate to your DevOps pipeline in the future.
Pushing container images to registries
You might want to run your container images on other container hosts, so pushing these images to external registries will allow for further utilization. In Windows Admin Center you can now easily push images to Azure Container Registry or registries such as Docker Hub.
For Azure Container Registry you can use your Azure account which is integrated with your Windows Admin Center installation. For other registries, you can follow the same process as pulling container images, by just providing the URL, username, and password.
Let us know what you think
All this new functionality was built based on your feedback. We strive to deliver the tools you need to perform your job, so let us know how we can improve the functionalities above, or what is missing for you to be successful in using Windows containers! You can share your feedback either here in the comments, suggest a new feature via User Voice, or start a conversation via Tech Community!
You can find me on Twitter at @vrapolinario.