We will run Docker Desktop on Windows 10 with Windows Subsystem for Linux 2 (WSL) in this post.

If you have been using Docker Desktop on Windows 10, you probably noticed that there is room to improve when it comes to performance.

With WSL 2, it is now possible to run Docker directly on WSL 2, utilise the built-in Linux kernel and run containers natively with emulation. This setup increases the overall performance of Docker.

WSL

If you don’t have WSL 2 installed on your machine, go ahead and enable it. Please note that your Windows 10 version needs to be 1903. Please use the official Windows docs to enable it.

Docker Desktop

If you have WSL 2 enabled, download the latest version of Docker Desktop and install it. If WSL 2 is enabled, you will see the following message, which is great, and all you need to do is follow the prompts.

Check WSL

To confirm that Docker is running inside WSL 2, open PowerShell and run the following command.

 wsl.exe -list -v

The output of the command should look like this. You can see that I have Ubuntu set as my default WSL distribution plus two Docker native distributions, and they are all running and set to WSL version 2.

  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

For WSL articles, please visit our sister blog WSL category page.


Posted

in

, ,

by

Comments

2 responses to “Run Docker Desktop With WSL 2”

  1. […] If you are using Docker Desktop on Windows, it is highly recommended to start using Docker with WSL 2, as we discussed in the previous post. […]

  2. […] The installation will take a few minutes. After it is done click on the Docker Desktop icon and start using it. If you are using WSL2 you can integrate it with Docker Desktop. […]