WSL 2 Default Distro Docker not found

Has anyone else had an issue where installing the latest Docker Desktop for Windows in WSL 2 mode doesn’t actually do anything to the default distro? I can run docker from PowerShell, but even though I even forced it in my only (and default) distro at the time (Ubuntu), I cannot run docker from that distro.

I’m new to Docker on WSL but followed every direction exactly and it doesn’t seem to work. Here are some images of what I’ve done and see. I’m sure I set something up incorrectly, but followed everything I found.

Win 10 20H2 (19042.572) WSL 2. I read another thread (Unable to run “docker info” inside WSL 2 docker-desktop distro: right or wrong? General Discussions 2d - 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 wit…

but according to the latest documentation it says to enable in your default distro, to select it in the Docker Settings, which I did.

Thanks, Vince

Start either a Windows Command Prompt or Powershell.

Run: wsl -l

Do you see

docker-desktop
docker-desktop-data

in the list? If so then Docker is working with WSL 2.

If you read Using Docker in WSL 2 then you will be quickly on the path to understanding this.

es. I couldn’t attach two images (since I’m new to the forums) but they show up. I can run stuff from PowerShell, but not from inside Ubuntu. According to the doc it should allow me to run inside Ubuntu, but it does not (or the doc is wrong).
Screenshot 2020-10-26 171727 Y

While I am still learning the details of how WSL 2 and Docker for Windows integrates I may have this wrong so take with a grain of salt.

When I use Ubuntu started from WSL I don’t think of it as another OS from which to run Docker Containers, I think of it as a Docker container running Ubuntu. So if I understand what you are asking, to me it translates into wanting to run a Docker container inside of a Docker container.

Also all of the learning I am doing with WSL 2 and Docker for Windows has to do with using it for development with Visual Studio Code, which has quite a but of useful information and working examples and tutorials. Containers, Remote development which can also work with remote Docker containers but I have not worked up to those examples yet, and the one I am really interested in is Create a development container (Link in next post).

Also ran into a new user limit of 2 links. Odd thing is that I am an admin on another Discourse forum so really do not like being treated like a newbie.

Also which doc are your refereeing?

Ubuntu in WSL is a Linux OS running in parallel to Windows, it has nothing to do with Docker.

1 Like