skip to Main Content

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.

2

Answers


  1. docker system prune
    this worked for me

    Login or Signup to reply.
  2. 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 FilesDockerDockerresourcescom.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"

    Distribution error

    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.

    wsl and docker

    I am not sure what caused it, but it was certainly not disk space.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search