Reputation: 133
When running docker desktop, it starts for 2 seconds and then closes.
I have tried reinstalling and changing the configuartion but nothing has worked so far.
Upvotes: 13
Views: 32361
Reputation: 152
I just had the same error today. I cannot be sure it is the same problem that you have so you must check first. I was getting the message "unable to calculate the disk image size" in the UI and not being able to execute any docker command to prune it (https://docs.docker.com/config/pruning/) since the daemon was down. I also updated docker to the latest version and the error was still there. I am supposing you are using Docker Desktop for Windows over WSL 2.
The first step was to execute the self diagnostic tool (https://docs.docker.com/desktop/troubleshoot/overview/#self-diagnose-tool)
C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe check
Just to find out the following error message (and a few others that can be related, so I ignored them): "WSL Distribution docker-desktop is missing"
So, I checked the WSL list using the wsl --list --verbose
command and the docker-desktop distribution was in the "Uninstalling" state.
Following the advice here (even it is not for the same error) https://github.com/docker/for-win/issues/6971#issuecomment-636358053 which ensures it will be recreated, I executed wsl --unregister docker-desktop
and started the docker engine again and everything started without errors.
I am not sure what caused it, but it certainly wasn't disk space.
Upvotes: 12
Reputation: 21
In my case, I pruned all the unused containers, images, and volumes, as mentioned in the other comments. Additionally, I performed a "reset to factory defaults" (it's in Azure Desktop). Note that all settings and data will be removed. After these steps, the problem was resolved.
Upvotes: 0
Reputation: 11
I experienced a similar problem and here is what I did.
First I ran the following command
$ wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
docker-desktop Stopped 2
docker-desktop-data Stopped 2
Then I just unregister all distros like that
wsl --unregister docker-destop
wsl --unregister docker-destop-data
wsl --unregister ubuntu
And again installed ubuntu
wsl --install ubuntu
After all this, just launched the docker desktop. And it started
Upvotes: 0
Reputation: 305
In my case what helped was: uninstalling Docker, unregistering both Docker containers from wsl
, removing Docker
and Docker Desktop
from %APPDATA%
and reinstalling Docker.
Upvotes: 0