Docker for Windows 10 prefers WSL2 and will switch to it soon

Docker wsl2

WSL 2 is a new version of the architecture that Allows the Windows subsystem for Linux to run the Linux ELF64 binaries on Windows.

This new architecture, which use a real Linux kernel (Linux 4.19), modifies the way these Linux binaries interact with Windows and your computer hardware, while offering the same user experience as WSL 1 (the currently available stable version).

WSL 2 offers much faster file system performance and full system call support, allowing you to run more applications like Docker.

This new version of WSL 2 uses Hyper-V features to create a lightweight virtual machine with a minimal Linux kernel.

Expect better compatibility with Linux software, including Docker support, and "a dramatic increase in file system performance."

A real Linux kernel, the little touch that Docker cares about

The new version of the Windows subsystem for Linux has brought a true Linux kernel to Windows.

According to Simon Ferquel, Senior Software Developer at Docker, this advance is very importantas it brings with it a major change in the company's strategy for Docker Desktop.

En a post on the company blog, Ferquel announced that Docker will abandon Hyper-V virtualization, which you currently use for your Windows Docker application, to move to WSL 2.

“One of Docker's goals has always been to provide the best containerized experience in an office environment, with the closest experience to native, whether you're working on Windows, Mac, or Linux.

To do this, we spend a lot of time working with the software stacks provided by Microsoft and Apple. As part of this work, we have been closely monitoring the Windows Subsystem (WSL) since its introduction in 2016, to see how we could benefit from our products. ”

In WSL 2 the Docker daemon works fine with excellent performance and the time it takes to cold boot the dock in WSL 2 is about 2 seconds on our development machines.

We are very excited about this technology and are pleased to announce that we are working on a new version of Docker Desktop that operates WSL 2, with a public preview scheduled for the month of July. This will make the Docker development experience even greater, unlock new features, and since WSL 2 runs on Windows 10 Home Edition, Docker Desktop will too.

The benefits for developers

When using Docker the virtual machine that you run is completely opaque: you can interact with the Docker and Kubernetes APIs from Windows, but you can't run anything on the virtual machine. Except for Docker or Kubernetes containers.

With the integration of WSL 2, you will continue to experience the same integration perfect with Windows, but Linux programs that run on WSL will also be able to do the same.

What will make Docker developers happy is that they will be able to simultaneously develop Windows and Linux container programs.

A developer working on the Docker daemon using the Docker Desktop technical preview, WSL 2, and VS Code remote combined with the Docker Desktop Linux workspaces will run a full Linux toolchain to generate containers.

WSL mounts will have I / O performance almost identical to that of a native Linux machine.

This will solve one of the main problems with Docker Desktop with heavy I / O toolchains. NodeJS, PHP and other web development tools will benefit from this improvement.

Docker Desktop will take advantage of this to significantly improve its resource consumption. It will use as little CPU as possible, as well as the memory it needs, and memory / CPU-intensive tasks such as creating a container will run much faster than today.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.