How to setup Docker Desktop in Windows 11 using WSL

Опубликовано: 05 Июнь 2026
на канале: TechySavvy
456
4

Prerequisites of docker for windows 11
Before you install the Docker Desktop WSL 2 backend, you must complete the following steps:

WSL2 installation in windows 11 Video tutorial:-
   • How to uninstall WSL from windows 11  

Download
Download Docker Desktop Stable 2.3.0.2 or a later release.
https://hub.docker.com/editions/commu...

Resource link:-
https://docs.docker.com/docker-for-wi...

After installation of docker in windows 11 follow below steps:-

From the Docker menu, select Settings - General.
Select the Use WSL 2 based engine check box.

If you have installed Docker Desktop on a system that supports WSL 2, this option will be enabled by default.

Click Apply & Restart.
Ensure the distribution runs in WSL 2 mode. WSL can run distributions in both v1 or v2 mode.

To check the WSL mode, run:

wsl.exe -l -v

To upgrade your existing Linux distro to v2, run:

wsl.exe --set-version (distro name) 2

To set v2 as the default version for future installations, run:

wsl.exe --set-default-version 2
When Docker Desktop restarts, go to Settings - Resources - WSL Integration.

The Docker-WSL integration will be enabled on your default WSL distribution. To change your default WSL distro, run wsl --set-default distro name.

For example, to set Ubuntu as your default WSL distro, run wsl --set-default ubuntu.

Optionally, select any additional distributions you would like to enable the Docker-WSL integration on.
Click Apply & Restart.

Testing our docker installation in windows 11 by running following commands:-

docker run -dp 80:80 docker/getting-started
docker run hello-world
docker run -it ubuntu bash
lsb_release -a //check docker ubuntu version
apt update //update package in docker ubuntu instance
apt install lsb-release //to install lsb-release in docker ubuntu instance