6

I've followed the instruction in the official website to use docker with WSL 2 and I've installed the Ubuntu 18.04 for WSL 2 distro. I thought docker can automatically detect my distro, so I can choose which distro that will I use in my docker desktop. I've been searching about this issue, and still not get the solution. Please help, thanks.

This is the WSL Integration page, I've set my ubuntu 18.04 as default, but still no luck. Docker WSL Integration page

This is the list of wsl 2 distro that I have

List WSL 2 distro that I have

This is my docker version, it's the latest one. Docker version

Because of this, I can't access the docker container, it said

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
0

4 Answers 4

3

I believe this is because the public version of Docker Desktop for Windows does not yet support the backported WSL 2 support. The Edge/beta version does though.

2
  • 1
    Oh I see, but why can't we disable the Use the WSL 2 based engine (Windows Home can only run the WSL 2 backend) option? It's a bit weird for me, if they didn't support the WSL 2 but doesn't let us to use the Hyper-V backend.
    – ktvktv
    Sep 30, 2020 at 6:06
  • This is only a guess, but it's probably again because the stable version doesn't support the WSL 2 backport. I'm thinking the UI is confused because the system is in a state it doesn't understand - it was impossible to create your current WSL 2 configuration when that version of Docker Desktop was released. Sep 30, 2020 at 15:29
2

For others researching the same problem:

I was running Docker Desktop as an admin and not my regular user. After adding my user to docker-users group in windows, I was able to run Docker Desktop as a regular user.

0

Docker needs user to be in docker-users group. When you try launch admin privilege user Docker Desktop, it looks after WSL distro in admin space and fails any way.

Use cmd style CLI to fix it.

net localgroup docker-users your_username /ADD

After that use Docker and WSL from your regular user.

-1

For anyone still trying to solve this :

Open Docker Desktop => settings icon (top right) => Resources => WSL Integration

Unable the Ubuntu tick, Refresh click on Apply & Restart on the bottom right

Restart a new ubuntu console on your windows: sudo apt-get update

Check if docker is running by just typing : docker on the terminal

It should work.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.