I’m running Windows 10 Pro update to 20H2 build 19042. I installed WSL 2 upgrade. I installed Docker for Windows version 2.4.0.0 (48506). No additional distros installed.
Is it normal that from within WSL 2 I can’t run docker (-sh: docker not found)?
I expected it to give the same results as from Windows.
Yes, this is normal. “Inside WSL” means inside a specific Linux distro that you have installed from the app store. You have to install the docker cli to make this command available. Take a look at the installation docs for instructions for the distro you use. For example on Debian the package is called ‘docker-ce-cli’.
Thanks. That would deserve to be emphasized in the documentation. The Docker Desktop installation guide doesn’t mention the need to install a distro to fully exploit Docker Desktop.
They only speak of WSL2 as a backend where the images are stored and where the containers run. You can do all the Docker related stuff in PowerShell, you find no limits there. You have to install a Linux distro to use WSL2, not to use Docker (that’s what I’m doing, I do most of my work in Debian).