Docker Community Forums

Share and learn in the Docker community.

Silent install with WLS2

Hi there,

we’re building a Windows VM with Docker Desktop pre-installed. When we’re installing Docker through the GUI, there’s a checkbox to also install WSL2, so everything is happy.

However, we’re building VMs, so we want everything automated, and we want to do a Silent Install, as here:

however, it’s not clear if there’s a parameter to add WSL to the install, or will we have to do that in advance separately?

does anybody know if this is possible in the one step?

many thanks


1 Like

I wasn’t able to figure out how to do it through the docker installer, so I am just running
.\wsl.exe --install
in an Admin Powershell before I run the docker silent install.

I know this anwser is offtopic, as it does not explain how to enable WSL2 in generall. But that’s how I use Docker on Windows and still know everything works 100% like I am used to from Docker on Linux, which is not always the case with DfD.

I simply install Ubuntu 20.04 with wsl --install --distribution Ubuntu-20.04, enable systemd and then follow the docs to install docker-ce from docker’s repositories.