Steps
- Install Windows 10, version 2004 or higher.
- Enable WSL 2 feature on Windows
- Download Docker Desktop Stable 2.3.0.2 or a later release
- Install Docker Desktop
Step 2 - Enable WSL 2 Feature on Windows
Here the main step is the second step to focusing on how to Enable WSL 2 feature (Windows Subsystem for Linux) on Windows 10.
Enable this optional feature using the following command for Windows 10 on PowerShell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Download Windows 10 update assistant here. Then Update your Windows 10 version to the latest.
Enable Virtual Machine Platform Feature using PowerShell
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Set WSL 2 as the default version
wsl --set-default-version 2
If you got a normal message setting WSL 2 is fine, but if you are facing an error please visit https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel and install wsl2-kernal .msi file and install. Next, try to set WSL version 2 again.
Let's test your docker client, engine, and Kubernetes cluster status in PowerShell now.