Optionally, select any additional distributions you would like to enable the Docker-WSL integration on. įor example, to set Ubuntu as your default WSL distro, run wsl -set-default ubuntu. To change your default WSL distro, run wsl -set-default. The Docker-WSL integration will be enabled on your default WSL distribution. When Docker Desktop restarts, go to Settings > Resources > WSL Integration. To set v2 as the default version for future installations, run:
To upgrade your existing Linux distro to v2, run: WSL can run distributions in both v1 or v2 mode. If you have installed Docker Desktop on a system that supports WSL 2, this option will be enabled by default.Įnsure the distribution runs in WSL 2 mode.
Select the Use WSL 2 based engine check box.
Where ~ is expanded by the Linux shell to $HOME.
To get the best out of the file system performance when bind-mounting files, we recommend storing source code and other data that is bind-mounted into Linux containers (i.e., with docker run -v :) in the Linux file system, rather than the Windows file system.
It takes less than 10 seconds to start the Docker daemon when compared to almost a minute in the previous version of Docker Desktop. This means, Docker Desktop only uses the required amount of CPU and memory resources it needs, while enabling CPU and memory-intensive tasks such as building a container to run much faster.Īdditionally, with WSL 2, the time required to start a Docker daemon after a cold start is significantly faster. In addition, WSL 2 provides improvements to file system sharing, boot time, and allows access to some cool new features for Docker Desktop users.ĭocker Desktop uses the dynamic memory allocation feature in WSL 2 to greatly improve the resource consumption. With Docker Desktop running on WSL 2, users can leverage Linux workspaces and avoid having to maintain both Linux and Windows build scripts. Windows Subsystem for Linux (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.
For more information, see the blog Docker is Updating and Extending Our Product Subscriptions and the Docker Desktop License Agreement. While the effective date of these terms is August 31, 2021, there is a grace period until January 31, 2022, for those that require a paid subscription. Professional use of Docker Desktop in large organizations (more than 250 employees or more than $10 million in annual revenue) requires users to have a paid Docker subscription.