After installing and starting Docker Desktop on Windows, many users encountered the “docker desktop starting forever” problem. To fix the stated issue try to check WSL configurations or reinstall Docker Desktop.

How to Fix the “Docker Desktop Starting Forever” Problem in Windows?

The Docker Desktop application is a graphical representation of the Docker development and deployment environment. It is used to manage and visualize the Docker elements such as Docker images, containers, networks, and volumes.

However, sometimes while starting the Docker desktop application on Windows after the Docker installation, the user may encounter the “Docker Desktop stuck on Starting Docker Engine forever” problem as shown below:

Docker Desktop Starting Forever

This problem occurs due to various reasons such as WSLEngine being disabled from the “settings.json” file, WSL is not configured on Windows, or problems with Docker Desktop installation. 

To fix the “Docker Desktop stuck on Starting forever” problem, go through the listed solutions:

  • Enable “wslEngineEnabled” Settings From settings.json File
  • Unregister or Terminate Docker Desktop From WSL
  • Switch to Windows Containers
  • Check If WSL is Enabled or Not
  • Remove “.docker” Directory to Clean Restart Docker
  • Reinstall Docker

So, let’s get started!

Solution 1: Enable “wslEngineEnabled” Settings From settings.json File

By default, during Docker Desktop installation, the “wslEngineEnabled” setting is enabled in the “settings.json” file. But in case, if a mistakenly specified setting is disabled, the Docker Desktop application will be stopped or stuck on starting forever. To fix the stated issue, users need to set the “wslEngineEnabled” value as “true” from the “settings.json” file. For demonstration, go through the following instructions:

Step 1: View Hidden Directories

First, view the Windows hidden directories. For this purpose, launch the File Explorer and navigate to the “C:\Users\Dell” directory. After that, navigate to the “View” menu, select “Show” from the appeared context menu, and mark the “Hidden Items” to view the hidden files and folders:

View Hidden Folders

Step 2: Launch the AppData Folder

Next, find the “AppData” hidden folder, and double-click on it to launch the folder:

Launch AppData

Step 3: Open the “settings.json” File in the Text Editor

Next, navigate to the “Roaming > Docker” directory and double-click on the “settings.json” file to launch it in the text editor. Here, we have opened the file in the VS code editor:

Open "settings.json" File From Roaming > Docker Directory

Step 4: Enable the “wslEngineEnabled” Settings

Scroll down to the end of the file, search for the “wslEngineEnabled” setting option, and set its value as “true” to enable the specified settings:

 “wslEngineEnabled”: true,

After that, relaunch the Docker Desktop application via the Start menu and check if the application is started or not.

Solution 2: Unregister or Terminate Docker Desktop From WSL

When Docker Desktop is stuck on the starting condition forever, try to terminate the Docker Desktop processes from WSL or unregister the Docker Desktop processes. 

Terminate Docker Desktop Processes

It is recommended to terminate the Docker Desktop processes from WSL instead of unregistering them. Because, when a user unregisters the Docker Desktop from WSL it will remove all containers and Docker data from WSL as well. 

The most non-destructive way to stop the Docker Desktop from WSL is to terminate the Docker Desktop process.  To terminate the Docker Desktop process, first launch the Windows PowerShell tool as an administrative privilege via the Start menu:

Launch PowerShell

After that, terminate the Docker Desktop process through the given command:

wsl --terminate docker-desktop

Here, the “Docker Desktop – WSL distro terminated” error will pop up. Press the “Quit” button to terminate the application:

wsl --terminate docker-desktop

After that, terminate the “docker-desktop-data” process that manages and executes Docker Desktop configuration and data on WSL:

wsl --terminate docker-desktop-data

Now, try to restart the Docker Desktop application and check if the problem is fixed or not.

Unregistered the Docker Desktop Processes

In order to unregister the Docker Desktop application from WSL, simply use the “wsl –unregister docker-desktop” command:

wsl --unregister docker-desktop
wsl --unregister docker-desktop

After that, unregister the “docker-desktop-data” process through the mentioned command:

wsl --unregister docker-desktop-data
wsl --unregister docker-desktop

After that, relaunch the application and verify whether the problem is resolved or not:

Docker Desktop User Interface

Solution 3: Switch to Windows Containers

Docker Desktop applications can run Windows and Linux Docker containers without depending upon the Host system. When a user starts a Docker Desktop application, the Docker will automatically try to execute the Linux containers without bothering the installed system. This may cause the stated issue.

However, Linux containers can be executed on Windows systems but through the Linux kernel through WSL (Windows subsystem for Linux) configurations. But it is better to switch to Windows containers to tackle the conflict.

For this purpose, click on the “Show hidden apps/icons” icon from the right bottom corner, and right-click on the Docker Desktop icon. After that, click on the “Switch to Windows containers” option from the displayed menu to switch to Windows containers:

Switch to Windows Containers

Now, Docker Desktop will be restarted and start executing the Windows containers. However, users can run the Linux containers on Windows by enabling WSL2.

Solution 4: Check if WSL is Enabled or Not

If the WSL feature of Windows is disabled, the user is unable to run the Docker Desktop application. As Docker application executes both Linux and Windows containers. Therefore, to smoothly run Linux containers on Windows, the user must enable WSL2 on Windows. 

To fix the “Docker Desktop app stuck on starting forever” problem, make sure WSL2 is enabled through the following steps:

Step 1: Open “Windows Features” Settings

First launch the “Turn Windows features on or off” settings by searching it in the Windows Start menu:

Turn Windows features on or off

Step 2: Enable Containers, Virtual Machine Platform and WSL

Next, mark the “Containers” checkbox to run containers on Windows:

Containers

After that, scroll down and mark the “Virtual Machine Platform” and “Windows Subsystem for Linux” checkboxes. Then, press the “OK” button to enable the marked features on Windows:

Virtual Machine Platform
Windows Subsystem for Linux

The request required a restart of the system to implement the changes. For this purpose, hit the “Restart now” button:

Windows Complete the Requested Changes Wizard

Step 3: Set WSL Default Version 2

Now, set the default version of WSL as “2”. To do so, execute the mentioned command:

wsl --set-default-version 2
wsl --set-default-version 2

Now, relaunch the Docker app. This will resolve the “docker desktop stuck on starting forever” issue.

Solution 5: Remove “.docker” Directory to Clean Restart Docker

Occasionally, problems with Docker configuration files or Docker build context may cause the “Docker Desktop stuck on Starting forever” or “Docker Engine stopped” problems. To tackle the state conflict, the user may need to remove the Docker Desktop cache and the “.docker” directory. For this purpose, navigate to the  “C > Users> [UserName]” directory, select the “.docker” folder, and press the DELETE key:

After that, try to restart the Docker application. This action will regenerate the “.docker” directory automatically with fresh configurations and fix the “Docker Desktop stuck on starting” or “Docker Desktop stopped” issues.

Solution 6: Reinstall Docker

The problem with the Docker Desktop installation can also lead to the “Docker Desktop stuck on starting forever” issue. If the problem still persists after applying all the mentioned solutions, try to reinstall the Docker Desktop application. 

For a demonstration, check out the following steps:

Step 1: Launch the “Add or remove programs” Settings

Launch the Start menu by hitting the “Windows” key. After that, search for “Add or remove programs” settings and launch it from the searched results:

Add or remove programs Settings

Step 2: Uninstall Docker Desktop App

Next, find the Docker Desktop app from the list of applications. Click on the “Three vertical dots” icon and select the “Uninstall” option to uninstall the Docker Desktop app:

Uninstall Docker Desktop

Step 3: Reinstall the Docker Desktop App

After that, navigate to the Docker official website, download the installer for the Windows Desktop application, and install the Docker app by following our linked “Install Docker Desktop Application” article.

We have covered the solutions to tackle the “docker desktop stuck on starting forever” problem.

Conclusion

The “Docker Desktop starting forever” problem occurs when WSL is not configured or enabled on Windows or problem with Docker installation. To fix the given issue, try to enable “wslEngineEnabled” Settings, unregister or terminate Docker Desktop from WSL, switch to Windows Containers, check if WSL is enabled or not, remove the “.docker” directory to clean restart Docker or reinstall the Docker Desktop app. This post has covered the fixes to tackle the “docker desktop stuck on starting forever” problem.