When My Docker Desktop Stuck on Starting State
Tags: docker, postgres, hypervisor, webdev
Published: 2022-05-21 10:52:29

Since getting to know about Docker, I feel that there are many **conveniences that I can feel while developing a project**. Like I can bring a project and its dependencies to the production environment easily, installing multiple services (ex: database, message broker, etc) regardless of the OS I'm using.

A few days ago, when I was about to work on a project, I called the Docker Desktop service to start up. Incidentally I was in need of a Postgres service for a related project, but somehow after a long wait and **I tried to login to Postgres but failed** because the port was not recognized. After I checked the Docker Desktop, it was **still in the starting state**. Even after hours it is still in the starting state.

![docker deskstop stuck at Docker Desktop starting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvdol4oqbvpu23g5gceo.png)

Because I felt I did not give any treatment to the settings of the Docker Desktop before, so I thought this might just be an occasional bug, so I tried to restarting my Windows. However, the result is still the same. I felt I just wasted a lot of time, then I finally **decided to re-install the Docker Desktop**.

But what happened? When I did the uninstall process it just couldn't work. The uninstall process is stuck at the _stopping vm ..._ state, even after waiting for hours it's still the same. I tried to download the latest version of Docker Desktop, then I tried to update using it. **I didn't expect that the result would be the same as the uninstall process**, which was stuck at the _stopping vm ..._ state.

![Upgrade gets stuck in "Stopping VM and preparing for update" state](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zsbv4lzho4l0fc6qq635.png) 

Finally I googled and found [a discussion on Github](https://github.com/docker/for-win/issues/1431). **I followed the steps as it written in the comments below** (thanks to [ianmaddox](https://github.com/ianmaddox)).

![fix docker desktop stuck on starting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bh56mhyi72cz3y0x1mxz.png) 

1. Search for `hyperv`, then select `windows features`
![hypervisor windows features](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fkwyrz35fvrcr8ar6efe.png)
2. Uncheck `Containers`, `Hyper-V`, and `Windows Hypervisor Platform`, then press `OK`
3. Search for `hyperv`, then select `Hyper-V Manager`
![windows hyper-v manager](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8ollrct7l5co46kdzyv.png)
4. Stop any Docker instances (if any)
5. Restart your Windows.
6. Check all features that has been unchecked on steps no. 2
7. Try to start you Docker Desktop
8. If it is still stuck on starting state, repeat steps no. 1-6, then re-install Docker Desktop

After further investigation, it turns out that this problem can be caused by several things, including installing another service that uses a hypervisor (besides Docker), updating the Docker Desktop when the WSL feature is on, etc. But for the problem I'm experiencing, **it's still not clear why it happened like that**, because **I feel like I haven't made any changes to the Docker Desktop or hypervisor**.

That's what I can share regarding my experience dealing with Docker Desktop stuck on starting state. Thank you for reading this article to the end. **Help others who have the same problem by share this article**.