"Docker Desktop" should integrate into WSL without additional configuration. Especially, it should not be necessary to append folders to the PATH environment variable.
Of course it must be made sure that "Docker Desktop" as well as the certain WSL distribution are set up for WSL2: In "Docker Desktop" settings "General/Use the WSL2 based engine" must be checked and wsl -l -v
should list version 2. If the latter is not true, it can be fixed by wsl --set-version <distribution> 2
, where <distribution>
is the name from the previous list. Note that "Ubuntu" and "Ubuntu-22.04" (for example) are different.
"Docker Desktop" normally integrates with the default distribution. It can be seen from the asterisk in wsl -l -v
which one had been chosen. For me this once was set to "docker-desktop-data" (probably because "Docker Desktop" had been installed earlier than the distribution). The default distribution can be changed by wsl --set-default <distribution>
. Furthermore, in "Resources/WSL integration" of "Docker Desktop" settings, the option "Enable integration with my default WSL distro" must be set.
If another distribution than the default one should use docker as well, it needs to be selected explicitely in the list of distributions of "Resources/WSL integration". Press "Refresh" if that other distribution had been installed recently while "Docker Desktop" was already running.
"Integration" means, as far as I can tell, that a link /usr/bin/docker
, pointing to /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker
, is created automatically. Since /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker
seems to be available in all distributions regardless of the integration setting, the presence (or not) of /mnt/wsl/docker-desktop/cli-tools/usr/bin
and its content might help to analyse the problem. There should be docker
, docker-compose
and others:
ls -l /usr/bin/docker
ls -l /mnt/wsl/docker-desktop/cli-tools/usr/bin
wsl -l -v
. – Undersea