docker / docker/docker-install

What is the reason for WSL2 not being supported ?

Open
#412 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
3.2k
Forks
863
Avg merge
3h 15m
Merged PRs (30d)
2

Description

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 ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the get-docker.sh entry point and its is_wsl() check. Investigate the support rationale for Docker Engine inside WSL2 and compare it with the reported Debian bookworm behavior. Done means documenting the specific limitations, risks, or supported alternatives rather than only noting that installation can succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops, operating-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.