Dockers on Windows: Powering the 5 Biggest Changes in IT

DZone 's Guide to

Dockers on Windows: Powering the 5 Biggest Changes in IT

Check out this article from our recently-released Containers Guide that tells you how versatile Docker on Windows can be.

· Cloud Zone ·
Free Resource

This article is featured in the new DZone Guide to Containers: Development and Management. Get your free copy for more insightful articles, industry statistics, and more! 

Docker runs on Windows Server 2016 and Windows 10, powering Windows apps in lightweight, portable containers. You can take existing applications and run them in Windows Docker containers with no code changes, and you can take new applications and simplify the whole CI/CD process using Docker. Windows containers come with production support from Microsoft and Docker, so you can confidently make the move away from VMs to containers.

This article explains how Docker works on Windows, and it looks at how containers are helping Windows organizations meet the five biggest challenges in the IT industry — from migrating to the cloud to modernizing traditional applications and driving new innovation.

Docker on Windows

Docker started in Linux, using core features in the kernel for isolating workloads, and making them easy to use. Microsoft added container support to Windows in 2016, partnering with Docker engineers to bring the same user experience to Windows.

All the Docker concepts work in the same in Windows and Linux: you package your app into a Docker image using a Dockerfile, distribute the app by pushing the image to a registry, and run your app by pulling the image and starting a container. The container uses the underlying operating system to run processes so containers are fast and efficient, as well as being portable and easy to secure.

Windows containers are based on images that Microsoft provides and maintains, releasing new versions each month with all the latest Windows updates. Nano Server is a lightweight server option for new applications using technologies like .NET Core, NodeJS, and Go. Windows Server Core is a full server runtime with support for existing workloads, including .NET Framework and Java apps.

The Docker experience on Windows is the same as on Linux: you install Docker on your Windows server, and you don't need to install any other software. Any apps you run are by Docker, and the application containers have all the dependencies they need. Containers use resources from the host server, but they're isolated from each other. You can run different versions of the .NET Framework in different containers on the same server with no interference.

You can learn how to Dockerize Windows applications in two video series on YouTube. Modernizing .NET Apps With Docker  for IT Pros is aimed at operations teams. It shows you how to deploy existing apps to containers using artifacts like MSIs, and how to modernize the delivery and management of apps by integrating with the Docker platform without changing code.

Modernizing .NET Apps With Docker for Developers shows how to modernize the architecture of an existing application, break down a monolithic design into smaller services, run them in containers, and plug them together using Docker.

The support for new and old Windows applications in containers is an enabler for meeting the major challenges facing enterprise IT.

1. Cloud Migration

Running in the cloud should bring agility, flexibility, and cost savings. To get those benefits for existing Windows apps, you typically had to choose between two approaches: Infrastructure-as-a-Service (IaaS), and Platform-as-a-Service (PaaS).

IaaS means renting Windows VMs and deploying your apps in the same way as the datacenter. It means you can re-use your existing scripts and processes, but you take the inefficiencies of running virtual machines into the cloud, which means you have a whole suite of VMs to monitor, manage, and update. You can't scale up quickly because VMs take minutes to start, and you can't run apps with higher density so you're unlikely to see significant cost benefits.

PaaS means using the full product suite of your cloud provider and matching the products to the features your app needs. In Azure that could mean using App Services, API Management, SQL Azure, and Service Bus queues. It's likely to give you high agility, and using shared services means you should save on cost - but it's going to take a project for every app you want to migrate. For each app, you'll need to design a new architecture, and in many cases, you'll need to change code.

Docker on Windows gives you a new option that combines the best of IaaS and PaaS: move your apps to containers first, and then run your containers in the cloud. It's a much simpler option that uses your existing deployment artifacts without changing code, and it gives you high agility, low cost, and the flexibility to run the same apps in a hybrid cloud or multi-cloud scenario.

2.  Cloud-native Apps

Cloud-native applications are container-packaged, are dynamically managed, and use microservice architectures. Docker brings cloud-native approaches to building new Windows apps. You can deliver a project using a modern technology stack like .NET Core and NodeJS.

You can run those apps on Nano Server containers — which are smaller and faster than full Windows Server Core containers — but they run on Windows Server, so you don't need your team to become Linux experts to start building cloud-native apps.

You can also integrate your Windows microservices with fantastic open-source projects which already run on Docker to add features and extend capabilities — software like NATS, which is the message queue project from the Cloud Native Computing Foundation (CNCF). It's enterprise-grade software which comes packaged in a Windows Docker image, so you can drop it right into your solution with no complex configuration.

Cloud-native applications are container-packaged, are dynamically managed, and use microservice architectures. Docker brings cloud-native approaches to building new Windows apps. You can deliver a project using a modern technology stack like .NET Core and NodeJS.

3.  Modernizing Traditional Apps

New cloud-native apps are an important part of innovating for the future, but most enterprises already have a much larger landscape of traditional applications. These are apps which typically have a monolithic architecture and manual deployment steps, which are complex and time-consuming to develop and test, and fragile to deploy.

Many Windows organizations are also managing apps across a range of operating systems - including Windows Server 2003 and 2008. It's hard to maintain an application landscape that is running on diverse operating systems, which each have different toolsets and different capacities for automation.

The Docker container platform brings consistency to all containerized applications, old and new. The Windows Server Core Docker image — which Microsoft maintains  — has support for older application platforms, including .NET 2.0 and 32-bit apps. You can take a ten-year-old application and run it in a Windows container, without even having the original source code.

This is letting organizations migrate off older operating systems and move to a model where every app runs as a container. You can even run a hybrid Docker swarm cluster, using a mixture of Linux and Windows servers. Then you can run brand-new microservices apps in Linux containers alongside traditional .NET Framework apps on Windows containers on the same cluster, and use one set of tools to package, deploy, and manage all those apps.

4. Innovation

Technical innovation doesn't end with cloud-native apps. Trends like IoT, machine learning, and serverless functions are all coming closer to mainstream, and they're all made easier and more manageable by Docker.

One of the biggest concerns in IoT projects is how to manage the software running on the devices, and how to distribute and safely deploy updates. When you run your device software in containers, you can use the distribution mechanism built into Docker to deploy new updates without writing custom code.

Machine learning frameworks like TensorFlow tend to have a large list of dependencies, but running them in Docker makes it trivial to get started. You can even package your own Docker container image with your trained models and make them available publicly on Docker Hub or privately inside your organization. Then, anyone can start taking advantage of your trained models just by running containers.

Serverless is all about containers. Developers write code and the serverless framework takes care of packaging the code into a Docker image, and then it runs containers to execute the code when a trigger comes in, like an HTTP request or a message on a queue. Serverless isn't just for cloud deployments, and there are great open-source projects like OpenWhisk, Nuclio, Fn, and OpenFaas that are powered by containers. You can run serverless functions on the same Docker cluster as your microservices and your traditional apps.

Gloo is a recently released project that lets you tie together portable serverless functions with proprietary serverless functions, microservices, and traditional apps. Gloo is a function gateway that can be extended with plugins and runs on Kubernetes. It is designed for microservice, monolithic, and serverless applications. For example, an enterprise developer could modernize a traditional application by containerizing it with Docker Enterprise Edition and then, using Gloo, start to add functionalities to it using microservices, portable functions using Fn, and proprietary functions using AWS Lambda.

5.  DevOps

The last big challenge facing enterprise IT is about cultural change and the move to DevOps, which should bring faster deployments and higher quality software. DevOps is usually positioned as people and process change, but it's hard to make big changes unless you underpin them with technology change.

Moving to Docker helps drive the change to DevOps, even for teams currently building and deploying Windows applications using older technologies. Everything in the Docker container platform is automated, which gets you fast delivery and reliable deployments and rollbacks. And the key artifacts — Dockerfiles and Docker Compose files — become the joint responsibility of developers and IT Pros.

Having teams working on the same technology and speaking the same language is a great way to break down barriers. People are excited by Docker, too. It's an interesting, powerful new technology which is easy to get started with and can improve practices from development to production. Teams adopting the Docker container platform are enthusiastic and that helps drive big changes like the move to DevOps.

Summing Up

Docker on Windows is today's technology, and it's an enabler for meeting the real challenges that enterprises face. You can get started with Docker very easily by packaging up your existing applications or adding Docker support to new projects. Then you can run your apps in containers which are the same in every environment, right up to production, where you have support from Microsoft and Docker.

This article is featured in the new DZone Guide to Containers: Development and Management. Get your free copy for more insightful articles, industry statistics, and more! 

docker ,windows ,cloud ,container ,cloud migration

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}