Docker-desktop - WSL distro terminated abruptly

A WSL distro Docker Desktop relies on has exited unexpectedly.This usually happens as a result of an entity terminating WSL (e.g. running wsl --shutdown).

Is it a qustion or an answer? Sorry, I can’t decide as your example command seems to be an answer and since Docker Desktop on Windows usually use WSL2 as backend, it is not surprising that Docker Desktop shows the message when WSL is stopped.

Sorry ,I didn’t make myself clear.This is a question ,I met with this problem.At first I can use the docker serve,but after I restart my computer,this was showed.I tried reinstalling docker and wsl several time but it still can’t operate

Hello.

Please check if wsl works well with the command below in cmd or powershell on your PC

wsl -l -v

If it’s not, try the following command
ubuntu or wsl

best regards
limsangwoons

both ubuntu and 2 docker-desktop serves were shutdown,I tried unregister all of them but that didn’t help

Hello.

Run wsl and try docker desktop again.

Please share the result screen after proceeding sequentially
And please check the wsl version.

best regards
limsangwoons

A distribution can not shutdown, it can only be in not running state because it was not started or terminated. To stop a distribution, it must be terminated.

A shutdown will stop the WSL2 system vm, which as a result will stop the runtime environment for the distributions. The two Docker Desktop backend distributions would be affected as well.

You can try use “netsh winsock reset” command in powershell by administrator mode. then reboot your compoter.

1 Like

Hello.

I think the version of WSL running docker desktop is 1 so I have a problem running docker desktop.

The WSL2 change commands are as follows.
wsl --set-version Ubuntu-20.04 2

best regards.
limsangwoons.

I’m confused. Do you have a problem too? I thought you tried to help.

If you wanted to react to the previous screenshot, Docker Desktop ran in a WSL2 distribution. Ubuntu 20.04 could run a Docker client and according the the documentation it indeed has to be WSL2 distribution, but the original question was not about WSL2 intergation so that Ubuntu 20.04 distribution should not affect how Docker Desktop works.

For me, Disabling ‘Use legacy console’ fixed docker desktop not starting. (From console, top left icon, properties)

image

1 Like

Hello! Did you sovle this problem? I met the same problem when I use docker to run fmriprep. If you are still experiencing issues, please let me know how to sovle it!

I encountered the same error.
I tried reinstalling Docker Desktop and reopening Windows options such as Hyper-V and Virtual Machine Platform, but none of them resolved the issue.

This is useful. I found a more detail solution on ZhiHu, please check the following link.

Hi, I’m using win 11 and this error still exist, however since win 11 deprecates Legacy console mode so I have no way to disabling this.

The program has been classified as “deprecated”. Obsolete functions will no longer be developed further, meaning that the software will no longer be supplied with updates. In addition, legacy console mode will no longer be installed by default in later builds. However, the tool is still available as an optional feature that can be downloaded if required. The “DISM /Add-Capability” command is available for this purpose.

Restart your WSL service by opening the power shell in Windows but have permission to open it, and run command,
Restart-Service- Lxssmanager

I provide a possible solution.
When installing Docker Desktop, I used the mklink command to switch the installation directory of Docker from the C drive to the D drive. After that, I encountered this error.

Later, I unregist docker-desktop and docker-desktop-data, completely uninstalled Docker from the D drive, removed the mklink command, and reinstalled Docker using its default installation path.

Then, I was able to open Docker again.

Don’t know why. But it works.