Category: Docker

Docker Desktop WSL 2 Tech Preview

Run Linux Containers with Docker Desktop and WSL 2

Today, Docker launched the first Tech Preview of the Docker Desktop WSL 2. This means you can now use Docker Desktop and the Windows Subsystem for Linux 2 (WSL2) which is using the hypervisor in the background to run Linux containers on Windows 10. With the significant changes to the Windows Subsystem for Linux 2, you can now take advantage of these improvements with your Docker Desktop client.

Docker Desktop WSL 2 is currently in Tech Preview, and it also requires the Windows 10 Insider Preview builds. That means you should only use for not production environments.

WSL 2 introduces a significant architectural change as it is a full Linux kernel built by Microsoft, allowing Linux containers to run natively without emulation. With Docker Desktop WSL 2 Tech Preview, users can access Linux workspaces without having to maintain both Linux and Windows build scripts.

Docker Desktop also leverages the dynamic memory allocation feature in WSL 2 to greatly improve the resource consumption. This means, Docker Desktop only uses the required amount of CPU and memory resources, enabling CPU and memory-intensive tasks such as building a container to run much faster.

You can find more information about the Tech Preview here.

Prerequisites

To run the Docker Desktop WSL 2 Tech Preview, you will need to set up the Windows Subsystem for Linux 2 (WSL 2) first. You can do that using the following guide, or follow these steps:

Install Windows 10 Insider Preview build 18932 or later.

Install the Windows WSL feature and the Windows Virtual Machine Platform feature running the following commands:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
 
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Download WSL Linux distribution based on Ubuntu 18.04 from the Microsoft Store. You can read more about Linux on Windows 10 here. The distribution needs to be set as the default WSL distro.

Enable Virtual Machine Platform

Enable Virtual Machine Platform

Make sure that the WSL distro is running in WSL 2 mode. You can check the list of distros installed on your Windows 10 machine, with the following PowerShell command:

wsl -l -v

To set the distro to WSL 2, you can run the following command. Change the name of the distro:

wsl --set-version DistroName 2
Install WSL 2

Install WSL 2

To find out more about installing WSL 2, check out the Microsoft Docs page.

How to set up Docker and WSL 2

First, you will need to download the Docker Desktop WSL 2 Tech Preview here. Make sure you already configured all the WSL 2 steps described in the prerequisites, before you install the Docker WSL 2 Tech preview. If you are prompted if you want to use Linux containers or Windows containers during the installation, select Windows containers. If you choose Linux containers, you will have the classic Docker experience with a Hyper-V VM.

Docker Desktop WSL 2 Tech Preview Menu

Docker Desktop WSL 2 Tech Preview Menu

Run the installation wizard, and after a successful installation, the Docker Desktop menu displays the WSL 2 Tech Preview option. You can select WSL 2 Tech Preview from that menu to start and configure the daemon running WSL 2.

Docker Desktop WSL 2 Tech Preview

Docker Desktop WSL 2 Tech Preview

You can switch between the classic daemon or the Windows Subsystem for Linux 2 with the following commands:

# Switch to classic deamon
 
docker context use default
 
# Switch to WSL 2
 
docker context use wsl
Linux Container on Windows 10

Linux Containers on Windows 10

You can now also do crazy things like run SQL Server on Linux in a Docker container on Windows 10.

SQL Server on Linux Docker Container Windows 10 WSL 2

SQL Server on Linux Docker Container Windows 10 WSL 2

I hope this gives you a good overview of how you will be able to run Linux containers on Windows in the future. Again this is still a Tech Preview, and we might see many changes to that feature. If you want to know more, read the full blog post on the Docker page. Also, check out the current Linux Container on Windows documentation. If you any questions, feel free to leave a comment.




Windows Server 2019

Which Windows Server 2019 Installation Option should I choose?

Windows Server 2019 will bring several installation options and tuning options for virtual machines, physical servers as well as container images. In this blog post, I want to give an overview of the different installation options of Windows Server 2019.

To compare the different Windows Server 2019 editions, check out the Microsoft Docs.

Installation Options for Windows Server 2019 Physical Servers and Virtual Machines

As always, you can install Windows Server 2019 in virtual machines or directly on physical hardware, depending on your needs and requirements. For example, you can use Windows Server 2019 as physical hosts for your Hyper-V virtualization server, Container hosts, Hyper-Converged Infrastructure using Hyper-V and Storage Spaces Direct, or as an application server. In virtual machines, you can obviously use Windows Server 2019 as an application platform, infrastructure roles or container host. And of course, you could also use it as Hyper-V host inside a virtual machine, leveraging the Nested Virtualization feature.

Installation OptionScenario
Windows Server CoreServer Core is the best installation option for production use and with Windows Admin Center remote management is highly improved.
Windows Server Core with Server Core App Compatibility FODWorkloads, and some troubleshooting scenarios, if Server Core doesn’t meet all your compatibility requirements. You can add an optional package to get past these issues. Try the Server Core App Compatibility Feature on Demand (FOD).
Windows Server with Desktop ExperienceWindows Server with Desktop Experience is still an option and still meets like previous releases. However, it is significantly larger than Server Core. This includes larger disk usage, more time to copy and deploy and larger attack surface. However, if Windows Server Core with App Compatibility does not support the App, Scenario or Administrators still need the UI, this is the option to install.


Remove All Docker Container Images

New Windows Server 2019 Container Images

Microsoft today released the new Windows Server 2019 again. After they quickly released Windows Server 2019 during Microsoft Ignite, they removed the builds again, after some quality issues. However, today Microsoft made the Windows Server 2019 builds available again. Microsoft also released new Windows Server 2019 Container Images for Windows, Windows Server Core and Nano Server.

Download Windows Server 2019 Container Images

You can get them from the new Microsoft Container Registry (MCR).

Microsoft was hosting their container images on Docker Hub until they switch to MCR (Microsoft Container Registry). This is now the source for all Windows Container Images like Windows Server 2019, Windows Server 2016 and all the Semi-Annual Channel releases like Windows Server, version 1709 or Windows Server, version 1803.

Download the Windows Server 2019 Semi-Annual Channel Container Images (Windows Server, version 1809). This includes also the new Windows Container Image.

 
docker pull mcr.microsoft.com/windows/servercore:1809
docker pull mcr.microsoft.com/windows/nanoserver:1809
docker pull mcr.microsoft.com/windows:1809

The Windows Server Core Image is also available as a Long-Term Servicing Channel Image:

 
docker pull mcr.microsoft.com/windows/servercore:ltsc2019

However, if you want to browse through container images, Docker Hub continues to be the right place to discover container images. Steve Lasker wrote a blog post about how Microsoft syndicates the container catalog and why.

Download Windows Server 2016 and Windows Server SAC Container Images

Also the existing Windows Server 2016 and Windows Server, version 1803 and Windows Server 1709 container images moved to the Microsoft Container Registry (MCR).

 
# Here is the old string for pulling a container
 
# docker pull microsoft/windowsservercore:ltsc2016
 
# docker pull microsoft/nanoserver:1709
 
# Change the string to the new syntax and use the same tag
 
docker pull mcr.microsoft.com/windows/servercore:ltsc2016
 
docker pull mcr.microsoft.com/windows/nanoserver:1709

You should also make sure to update your Dockerfile references:

Old Windows Server Dockerfile reference

FROM microsoft/windowsservercore:ltsc2016

New Windows Server Dockerfile reference

FROM mcr.microsoft.com/windows/servercore:ltsc2016

Removing the “latest” tag from Windows Images

Starting 2019, Microsoft is also deprecating the “latest” tag for their container images.

We strongly encourage you to instead declare the specific container tag you’d like to run in production. The ‘latest’ tag is the opposite of specific; it doesn’t tell the user anything about what version the container actually is apart from the image name. You can read more about version compatibility and selecting the appropriate tag on our container docs.

Removing Container Images

Remove All Docker Container Images

If you want to remove existing container images from your PC, you can run docker rmi to remove a specific image. You can also remove all containers and container images with the following commands:

 
# Remove all containers
docker rm $(docker ps -a -q)
 
# Remove all container images
docker rmi $(docker images -q)

If you want to know more about Windows Containers and the Microsoft container eco system, visit the Microsoft container docs.



Windows Server 2019

Windows Server 2019 – What is coming Next

A while ago Microsoft announced the next key versions Windows Server 2019 and System Center 2019. And a couple of weeks ago, at the Windows Server Summit, Microsoft was taking more about what is new in Windows Server 2019. Microsoft also talked a lot about the positioning of Windows Server and what we can expect in the future. With the news finally released to the public, I can start talking and blogging about the new features and investments. I decided to create a series of blogs, to show the world the great new features. This blog post here, should give you a high level overview about how Microsoft is investing in Windows Server 2019.

Windows Server – The Power behind the Intelligent Cloud and the Intelligent Edge

Intelligent Cloud and Intelligent Edge

Windows Server is not only powering the Intelligent Edge where you have a great Software-Defined Datacenter plaform running Hyper-V or Stroage Spaces Direct, or as application platform. It is also powering the Microsoft Azure Intelligent Cloud. Windows Server is running the foundation of the platform of Azure and also many many services running in Microsoft Azure and Microsoft Azure Stack. If the innovation happening in the Microsoft Public Cloud, we as customers also benefit from that.

Windows Server – Hybrid Cloud in the DNA

Windows Server Hybrid Cloud

Windows Server is a great platform and it runs where ever you are. If you run on-premises in your Software-Defined Datacenter running in on physical hardware or in virtual machines or on Azure Stack, Windows Server is your platform. If you are running in the Public Cloud, Windows Server is not only the platform powering Azure. Windows Server is also a great platform for you to run application in Microsoft Azure or other cloud services providers.

Azure Hybrid Benefit for Windows Server

Azure Hybrid Benefit for Windows Server Reserved Instances

The Azure Hybrid Benefit for Windows Server is also a great option to run Windows Server workloads in the cloud. It allows customer to leverage the licensing they already have. This can bring down cost by a huge factor, and this together with Azure Reserved VM Instances up to 82%.

Windows Server 2019 – Innovation and Investments

Windows Server 2019 Investments

If we have a look at the investments done in Windows Server 2019, we can see that we can categorize them in 4 categories.

  • Hybrid Datacenter Platform
  • Security
  • Application Innovation
  • Hyper-Converged Infrastructure

Unique hybrid datacenter platform

Windows Server 2019 brings new functionality and features to extend your datacenter to Azure to maximize existing investments and gain new hybrid capabilities. To achieve this Microsoft brings improvements to Windows Server 2019 like built-in Azure Active Directory integration, Azure Backup, Azure Site Recovery, Storage Migration Services and many more.

Enhanced security capabilities

One of the key factors in today’s IT landscape is security. Microsoft started the journey by bringing enhanced security features to Windows Server 2016. With Windows Server 2019 Microsoft improves these security features of their server operating system. Microsoft adds new capabilities like Shield Virtual Machines for Linux, Exploit Guard, Encrypted Virtual Networks and under a lot of others. My favorite, the integration of Windows Defender Advanced Thread Protection or Windows Defender ATP.

Faster innovation for applications

With the Semi-Annual Channel releases of Windows Server, Microsoft already released some great investments to enable developers and IT pros. These allow them to create cloud native apps or modernize their traditional apps using containers and micro-services. In Windows Server 2019, Microsoft goes one step further and releases the SAC Improvement s like Linux Containers on Windows Server and the Windows Subsystem for Linux on Windows Server to the LTSC release. Microsoft also invest heavily to improve the container experience on Windows Server, by optimizing the container images for Server Core and Nano Server, a new Windows Container Image and better integration into orchestrators like Kubernetes and Service Fabric.

Unprecedented Hyper-converged Infrastructure

Microsoft is also improving your software-defined datacenter experience to achieve greater efficiency and security. With Windows Admin Center, Microsoft introduced a new web-based management UI which will be a perfect solution to manage your Windows Server 2019 servers. However, Microsoft is also investing in more hardware support like Storage Class Memory support. But also, on adding scale, resilience and performance improvements to your Storage Spaces Direct deployments. This includes improvements like Cluster Sets, improved performance for Mirror-accelerated parity volumes and much more.

In the next couple of days and weeks I will release some blog posts. These will covering the new features and improvements in Windows Server 2019 with a little more technical depth. And I am sure we will even have more to share after Microsoft Ignite. So ,stay tuned and follow my blog :)



Windows Container Images

The New Windows Container Image

At Microsoft Build 2018, Microsoft announced a new Windows container image, next to the Windows Server Core container image and the Nano Server container image. This new Windows container image is for applications and workloads which need additional API dependencies beyond Nano Server and Windows Server Core.

With the release of the latest Windows 10 Insider Preview (Build 17704), you can now download a preview of that container image. Your container host will need to run at least on the Windows Insider build 17704.

Windows Container Image

The IT world is transforming and Microsoft can see a huge demand by customers for containers. However the container images available today, Nano Server and Windows Server Core are lightweight versions of Windows and not including some of the components of Windows. A huge scenario for containers is to put legacy applications into containers. With the new Windows container image, Microsoft is offering a new option for applications who need more components which are not included in Windows Server Core, like DirectX or proofing support.

Microsoft Windows Container Images

As of today, Microsoft offers 3 container images in preview:

ImageVersionSize
mcr.microsoft.com/nanoserver-insider10.0.17704.1000232 MB
mcr.microsoft.com/windowsservercore-insider10.0.17704.10003.38 GB
mcr.microsoft.com/windows-insider10.0.17704.10008.07 GB

Getting started with Windows Containers

First you need to have a host running Windows Insider Preview Build 17704 or higher. After that you can simply use docker to get the latest Insider container images from the Microsoft Container Registry:

 
docker pull mcr.microsoft.com/nanoserver-insider
 
docker pull mcr.microsoft.com/windowsservercore-insider
 
docker pull mcr.microsoft.com/windows-insider

You can read more about the new Windows Container image here on the Microsoft Virtualization Blog.

If you want to know more about the production Container Images for Windows, check out my blog post: Docker Container Images for Windows Server 1709 and new tagging



Experts Live Netherlands 2018 Thomas Maurer

Speaking at Experts Live Netherlands 2018 in Ede

After speaking at Experts Live Netherlands in the past, I am happy to announce that I will be speaking at the Experts Live Netherlands 2018 Conference. Experts Live Netherlands 2018 will take place at 19 June 2018 in Ede. I have great professional and personal memories from the latest Experts Live Netherlands conference and it is always a huge honor to speak at a such a great event. I am also happy to be back in the Netherlands for a couple of days.

Experts Live

In my session, I will present about the latest Windows Server innovation in the Windows Server SAC releases as well as the next Windows Server 2019.

My Name is Server, Windows Server

In Fall 2017 Microsoft has updated Windows Server to the next Semi-Annual Channel release with new features and improvements and Microsoft will now release new SAC and LTSC releases. Join this session for the best of Windows Server, learn how the new Servicing Model of Windows Server works and what does it mean to use SAC or LTSC releases, and what new improvement and features Microsoft offers in the latest releases such as 1709, 1803 and Windows Server 2019. You’ll get an overview about the new, exciting improvements that are in Windows Server and how they’ll improve your day-to-day job.   In this presentation Thomas Maurer (Microsoft MVP) will guide you through the highly anticipated innovations in Windows Server 2019 and the Semi-Annual Channel including: · Windows Server Containers · Hyper-V features · Nano Server · Storage · Networking · Security · Windows Server Containers And more!

I really hope to see you there!