1.2 Operating environment¶
The following page gives the system requirements for installing Docker Desktop for Windows.
System requirements
https://docs.docker.com/docker-for-windows/install/#system-requirements
Attention
You can use Hyper-V or WSL 2 as the backend for Docker Desktop for Windows. This document assumes you are using the WSL 2 backend.
Your Windows machine must meet the following requirements.
Windows 10 64bit
Home or Pro 2004 (build 19041) or higher
Enterprise or Education 1909 (build 18363) or higher.
We recommend Home or Pro 22H2 (build 19045) or higher, or Enterprise or Education 22H2 (build 19045) or higher.
Minimum required is Home or Pro 21H2 (build 19044) or higher, or Enterprise or Education 21H2 (build 19044) or higher.
We recommend - Home or Pro 22H2 (build 19045) or higher - Enterprise or Education 22H2 (build 19045) or higher
Minimum required - Home or Pro 21H2 (build 19044) or higher - Enterprise or Education 21H2 (build 19044) or higher
WSL2 is enabled.
Hardware prerequisites for running WSL 2 correctly:
SLAT (second-level address translation) -compatible 64-bit processor.
4 GB system RAM.
BIOS-level hardware-virtualization support
BIOS settings must be enabled. For more information, see Virtualization must be enabled. [Please consider this concise expression.]
About the WSL 2 backend¶
For more information on the Docker Desktop WSL 2 backend, see Docker Desktop WSL 2 backend.
If you are sharing files with the Docker container running on the WSL 2 backend, you will see better performance if you bind-mount the filesystem in the Linux distribution.
If you are accessing files in the Windows filesystem, WSL 1 seems to have better performance than WSL 2. For more information on this, see Comparing WSL 1 and WSL 2.
1.3 Enabling WSL 2¶
To use the WSL 2 backend, you will need to enable WSL 2 in Windows. This briefly explains the procedure for enabling it.
For more information on the procedure to enable it, see manual installation in the Microsoft document Installation Guide for the Windows Subsystem for Linux in Windows 10 [Please confirm the official English title, if any.].
Install WSL¶
Launch PowerShell as administrator.
- Display the Quicklink menu.
Right-click the [ Start ] button, or press the Windows logo key + X .
Select
.When asked to confirm, “Do you want to allow this app to make canges to your device?” click [ Yes ].
Enable the “Windows for Linux subsystem” option.
Enter the following in PowerShell.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable the “Virtual machine platform” option.
Enter the following in PowerShell.
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enter the following in PowerShell.
Install the Linux kernel update package¶
Download the most recent package at the following URL:
WSL 2 Linux kernel for x64 machines, latest program package<https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi>`_
Double-click on the latest program package you downloaded.
When asked to confirm, “Do you want to allow this app to make canges to your device?” click [ Yes ].
Set WSL 2 as the default versions¶
Enter the following in PowerShell.
wsl --set-default-version 2
Install the Linux distribution¶
Open the Microsoft Store and select your preferred Linux distribution.[
Clicking the above link will open the Microsoft Store application. It will first take you to a web page asking permission: “This site wants to open the Microsoft Store.” To stop, click Cancel. To continue, click Continue.
Select one of the Linux distributions displayed in the Microsoft Store screen. In this example, we are choosing Ubuntu.
This will display an explanatory page for your chosen Linux distribution, from which you can get or install it.
If you see the Get button,
Click the Get button.
A dialog will be displayed asking if you are using multiple devices. If you only need to install this on the device you are currently using, click Not necessary.
Next, click the Install button to download and run the installer.
If you see the Install button,
If you have previously gotten the selected application (Linux distribution) from the Microsoft Store, the Get button will not be displayed; the Install button will be displayed instead.
Click the Install button to download and run the installer.
Launch the installed Linux distribution.
Once installation is complete, you will see a message “This product has been installed” with a Launch button.
Click the Launch button.
A window with the title “Selected Linux” will open, and the launch process begins.
The message “Installing, this may take a few minutes…” will be displayed. Wait for further instructions.
Set up the default Unix user account.
The message “Please create a default UNIX user account. The username does not need to match your Windows username.” will be displayed. Set up your Ubuntu user account.
For more information on default Unix user accounts, see Set up your Linux username and password.
Follow the onscreen instructions and enter new username, password, and password again.
Enter new UNIX username:
New password:
Retype new password:
When you complete the set-up process, the shell prompt will be displayed and will be ready for you to enter Unix commands. To quit Ubuntu, enter exit.
Confirm that you are running the Linux distribution in WSL 2 mode.
Enter wsl -l -v into PowerShell.
PS C:\Users\xxxxxxxx> wsl -l -v NAME STATE VERSION * Ubuntu Running 2 PS C:\Users\xxxxxxxx>
If the value of VERSION is 2, then you are running in WSL 2 mode.
If you used sect-set_default_2 to set the default version to 2, 2 will be displayed.
If the value is 1, enter the below command to upgrade it.
wsl --set-version Ubuntu 2
This completes the process of enabling WSL 2.