Skip to content

What is the reason for WSL2 not being supported ? #412

Open
@advnpzn

Description

@advnpzn

I've tried running the script to install docker in WSL2 (Debian bookworm) and I got the following warning.

curl -fsSL https://get.docker.com/ -o get-docker.sh
# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de

WSL DETECTED: We recommend using Docker Desktop for Windows.
Please get Docker Desktop from https://www.docker.com/products/docker-desktop/


You may press Ctrl+C now to abort this script.
+ sleep 20

But I've modified the script locally to make is_wsl() throw a false.

is_wsl() {
	case "$(uname -r)" in
	*microsoft* ) false ;; # WSL 2
	*Microsoft* ) false ;; # WSL 1
	* ) false;;
	esac
}

And I was able to install docker in my Debian bookworm WSL2.
And it is even working perfectly fine.

wsl --version
WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3447

I want to know why installing Docker in WSL2 is not supported and what issues do we face if someone installs Docker in WSL ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions