This has been happening many times.
I can’t start Docker Desktop on Windows, especially when I start some service using Ubuntu’s command prompt.
Yesterday I worked normally with the windows command prompt. At night I did the test of activating the Docker Desktop option also for WSL2 running Ubuntu.
Today when trying to open Docker Desktop I have the following error log:
———————————————————————————>8
Version: 4.18.0 (104112)
Sha1: b683d18ea7a6f5ef028c8148f1986c567deeb5c1
Started on: 2023/04/25 10:06:25.859
Resources: C:\Program Files\Docker\Docker\resources
OS: Windows 10 Home Single Language
Edition: CoreSingleLanguage
Id: 2009
Build: 22621
BuildLabName: 22621.1.amd64fre.ni_release.220506-1250
File: C:\Users\f_gwa\AppData\Local\Docker\log.txt
CommandLine: «C:\Program Files\Docker\Docker\Docker Desktop.exe»
You can send feedback, including this log file, at https://github.com/docker/for-win/issues
[2023-04-25T10:06:25.920800900Z][GUI][I] Starting…
[2023-04-25T10:06:26.064023900Z][GUI][I] An instance is already running. Launching the container view.
[2023-04-25T10:06:26.086024000Z][GUI][W] Launching the dashboard failed: O tempo limite da operação acabou.
[2023-04-25T10:06:26.089577300Z][GUI][E] System.Exception:
Docker Desktop is shutting down.
em Docker.Program.LaunchFrontend(Logger logger) na C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.Desktop\Program.cs:linha 294
em Docker.Program.Run(IReadOnlyCollection`1 args) na C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.Desktop\Program.cs:linha 195
———————————————————————————>8
Windows 11 running wsl2 with Ubuntu.
Docker Desktop Service is running on Windows services.
Docker Desktop.exe running on startup softwares.
Opening Docker Desktop is more than a challenge for some users after installing the developer tool. This utility is known to simplify and accelerate workflow while giving the independence to innovate with your choice of tools, application stacks, and deployment environments for each project. But sadly Docker Desktop Starting forever issue may occur when you try to launch the tool on Windows.
Docker Desktop failed to start problem occurs on Windows 11 or 10 when you give an attempt to launch the tool. The app continuously shows “Docker Desktop is starting” message on the screen but never fully loads. Fortunately, you can solve this issue with the Developer’s tool using a few tricks. See – Fix Error Code 0x89240101 in Windows 11 or 10 (Solved!).
Docker Desktop Starting Stuck in Windows 10 and 11
Here is how to fix Docker Desktop Starting forever error in Windows 11 or 10 –
Way-1: Switch to Windows container
During installation process, Docker Desktop doesn’t check whether an Operating System is Linux or Windows. However, the tool tries to look for Linux containers when starting that do not exist on your computer. Therefore, to deal with this problem, “Switch to Windows Containers..” first before launching the app using the following steps –
- Click on the System tray up arrow icon from the right side of Taskbar.
- Right click on the Docker Desktop icon.
- Select Switch to Windows Containers...
- A confirmation dialog box will prompt; click on Yes.
- Then close the app and launch it.
Way-2: Remove Windows Subsystem for Linux
Docker Desktop is prevented by Windows Subsystem for Linux from opening so you need to uninstall this feature then try to run and the app. Follow the steps –
- Press Windows and R.
- Type optionalfeatures and hit Enter.
- Find and uncheck – Windows Subsystem for Linux.
- Click on OK.
- After the uninstalling is completed, restart your PC.
- Open the Docker and follow the steps in Way-1.
Way-3: Uninstall the tool completely and then install running as administrator
To solve the problem, you need to uninstall Docker Desktop completely, delete the residue and leftovers and again download the app. Run the setup (Docker Desktop Installer.exe) as administrator for installation to successfully load this application. Here are the instructions:
- Press Windows and R keys.
- Type – appwiz.cpl.
- Hit – Enter.
- Right-click on Docker Desktop from Program and Features window and select Uninstall.
- On the User account control prompt, select Yes.
- When the “Uninstalling Docker Desktop” wizard shows Uninstalled successfully, click on Close.
- Then, go to C:\Users\username folder and delete the folder named .docker.
- Access – C:\Users\username\AppData\Local and delete – Docker.
- From C:\Users\username\AppData\Roaming, delete Docker.
- Restart the computer and download the app again.
- Right click on Docker Desktop Installer.exe and select – Run as administrator.
- Follow the guidelines and complete the installation.
Read – How to Remove Traces of Uninstalled Programs in Registry on Windows 11 or 10.
Way-4: Disable Docker at Startup
Multiple users report that Docker Desktop Starting forever problem occurs due to it being enabled at startup in Windows 11 or 10. Disabling the Startup from Settings app or the interface of the utility itself will fix this using below steps:
From the Docker desktop:
- Right-click on the whale icon from System tray.
- Select – Settings.
- In the General tab, uncheck Start Docker Desktop when you log in.
- Click on Apply & restart.
Through Settings app
- Press – Winkey+I.
- Select – Apps.
- On the next page, click on – Startup.
- Turn off the toggle switch for “Dock Desktop” in the list.
Way-5: Change Proxy Settings
Using proxy may also trigger Docker Desktop not starting forever and to solve this you will have to manually set configurations into the application.
- Click on Show hidden icon up arrow on the taskbar.
- Right-click on the “whale icon” and choose Settings.
- Once the app appears, select Resources.
- After the expansion of options, click on Proxies.
- Turn on Manual proxy configuration.
- Enter the information in the boxes and click Apply & restart.
Way-6: Use Windows PowerShell to fix Docker Desktop stuck on starting
Some customers briefed that Windowss PowerShell cmdlet helped them to resolve the issue by removing Hyper-V and reinstalling the same.
- Press – Widiws+S.
- Type – powershell.
- Click on – “Run as administrator”.
- Type the underneath cmdlet and press “Enter” –
Disable-WindowsOptionalFeature -FeatureName microsoft-hyper-v -online
- The computer will automatically restart after the removal, launch the Windows Powershell as administrator again and run the following command –
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
- Restart the computer and open Docker.
Way-7: End Task WSL and Visual Studio from Task Manager
Frequently, since running with Windows Subsystem for Linux mostly causes the message, ending task of WSL and Visual Studio from Task Manager may work for you so follow the steps –
- Press Ctrl+Shift+Enter.
- Once the Task Manager appears go to the Process list.
- Right-click on WSL and select – End task.
- In the same way, end task Visual Studio code.
- Right click on Docker Desktop and choose – End task.
- Launch the app.
Get help from – Multiple Tips to End Tasks and Processes on Windows 8.1 / 10
Methods:
Way-1: Switch to Windows container
Way-2: Remove Windows Subsystem for Linux
Way-3: Uninstall the tool completely and then install running as administrator
Way-4: Disable Docker at Startup
Way-5: Change Proxy Settings
Way-6: Use Windows PowerShell to fix Docker stuck on starting
Way-7: End Task WSL and Visual Studio from Task Manager
That’s all!!
If you have seen Docker Desktop starting forever Windows 11 error, we will look at workarounds to help fix Docker startup errors, including Docker Desktop is starting.
Table of contents
- What is Docker Desktop?
- Installing Docker Desktop
- Running the installer
- Setting the WSL2 option
- The installation begins
- Docker desktop installed successfully
- Docker Desktop Starting Forever Windows 11
- Make sure on the system requirements
- What if your system doesn’t meet the requirements?
- Windows containers
- Switching to Windows containers
- Unregister Docker Desktop
- Process to unregister docker desktop
- Use Windows PowerShell to fix Docker Desktop stuck on starting
- Uninstall the tool completely and then install running as administrator
- Disable Docker at Startup
- Disable and re-enable the WSL feature
- Make sure your virtualization capabilities are working correctly
- AMD CPUs
- Error message
- Hyper-V Errors
- Related posts
- Wrapping up
What is Docker Desktop?
Docker Desktop allows you to run Docker containers locally on your Windows 10 or 11 box or macOS or Linux.
With Windows, Docker Desktop uses the Hyper-V backend for the virtualization hypervisor or now WSL2 in modern client OS’es.
Installing Docker Desktop
Let’s look at the process to install Docker Desktop in Windows. After downloading the installer, run the .exe. You will see a UAC prompt most likely.
Running the installer
Click Yes to run the installer.
Setting the WSL2 option
You will see the options on the configuration. You will be asked to Use WSL 2 instead of Hyper-V (recommended) and add a shortcut to the desktop.
The installation begins
After that, the Docker Desktop installation will begin.
Docker desktop installed successfully
Docker Desktop is successfully installed. After the successful installation, you will be directed to close and log out. This will log you out of Windows.
A clean boot is one of the first steps to try to resolve the Docker Desktop Starting Forever error. A clean boot makes sure that only the needed services and programs are running. This will help you identify if there is a running app or service that may be causing issues with Docker Desktop.
1. Type msconfig in the Run dialog box and hit Enter.
2. Navigate to the Services tab and check “Hide all Microsoft services.”
3. Click “Disable all” and then go to the Startup tab.
-
Open Task Manager, disable any unnecessary startup programs, click the Windows button and select restart your computer.
After restarting, open Docker Desktop and check if the issue persists.
Make sure on the system requirements
Another reason for the Docker Desktop Starting Forever error in Windows 11 or 10 could be unmet system requirements.
Make sure that your PC meets the minimum requirements for running Docker Desktop. You can find the system requirements on the Docker documentation page.
What if your system doesn’t meet the requirements?
If your system doesn’t meet the minimum requirements you can think about upgrading your hardware. However, if you have any semi-recent or modern hardware, most hardware within the past few years will run Docker ok.
Windows containers
By default, Docker Desktop uses Linux containers. You can switchover to using Windows containers. You can see in troubleshooting if switching from Linux option to Windows, resulting in the Docker Desktop Starting Forever error message or if it goes away.
Switching to Windows containers
To switch to Windows containers:
-
Go to the Docker system tray icon and right-click on the whale icon.
-
Select “Switch to Windows containers” from the context menu.
Keep troubleshooting if you still see the error.
Unregister Docker Desktop
Unregistering Docker Desktop can help fix startup errors by clearing any corrupt or conflicting data.
Process to unregister docker desktop
1. Open Windows PowerShell as an administrator.
2. Type wsl --unregister docker-desktop
and hit Enter to unregister Docker Desktop.
3. Restart your computer and launch Docker Desktop.
You can also uninstall Docker Desktop and then reinstall Docker desktop. Also, check the Docker desktop version you are installing to make sure you have the latest.
Use Windows PowerShell to fix Docker Desktop stuck on starting
In some cases, using Windows PowerShell to stop and restart the Docker service can fix the Docker Desktop Starting Forever error:
1. Open Windows PowerShell as an administrator.
2. Type Stop-Service docker and hit Enter to stop the Docker service.
3. Type Start-Service docker and hit Enter to restart the Docker service.
If the above steps haven’t resolved the issue, try uninstalling Docker Desktop and perform a fresh install:
1. Open the “Apps & features” page in Windows Settings.
2. Locate Docker Desktop, select “Uninstall,” and follow the prompts.
3. Download the latest Docker Desktop installer from the official website.
4. Right-click on the installer and select “Run as administrator” to begin the installation. You may need to accept any user account control prompt messages
Disable Docker at Startup
Another way to fix the Docker Desktop Starting Forever error is to disable Docker at startup and then manually start it:
1. Press Ctrl + Shift + Esc to open Task Manager.
2. Navigate to the “Startup” tab, locate Docker Desktop, right-click, and select “Disable.”
3. Restart your computer.
After restarting, manually start Docker Desktop by double-clicking the Docker Desktop icon on your desktop or searching for it in the Start menu.
Disable and re-enable the WSL feature
If the Docker Desktop Starting Forever error still persists, try disabling and re-enabling the WSL feature once more:
-
Open the Run dialog box, type optionalfeatures, and hit Enter to open the Windows Features dialog.
-
Uncheck “Windows Subsystem for Linux” and click “OK.”
-
Restart your computer, reopen the Windows Features dialog, and check “Windows Subsystem for Linux.”
Once the WSL feature is re-enabled, attempt to relaunch Docker Desktop.
Make sure your virtualization capabilities are working correctly
In some systems, Hyper-V may not be functioning or enabled correctly. Check your BIOS settings to ensure virtualization is enabled.
AMD CPUs
If you are running an AMD CPU and are running a VMware workstation with nested virtualization enabled, there is a known issue where you can’t run virtualization on the host and VM simultaneously.
Error message
Below is an error message I received when running Windows 11 nested in VMware Workstation. The AMD host (threadripper CPU) had virtualization enabled on the host operating system.
I received the following message when trying to launch Docker on the VMware Workstation VM. If you run into issues enabling CPU virtualization on your VMware Workstation VMs, you will have issues running Docker Desktop inside them.
Hyper-V Errors
Hyper-V can also be used for running Docker Desktop on Windows. If you have issues with Docker Desktop taking forever to start, there may be Hyper-V-related errors. Check these solutions that are more hyper-v specific
-
Enable Hyper-V: Ensure that Hyper-V is enabled on your system. You can do this by going to “Turn Windows features on or off” in the Control Panel, and checking the “Hyper-V” option.
-
Check BIOS settings: Some hardware vendors might disable virtualization in the BIOS. Make sure to enable virtualization in your BIOS settings.
-
Restart Hyper-V services: Restart your Hyper-V services
net stop vmms net start vmms
Reset Docker’s virtual switch: Docker’s virtual switch in Hyper-V may be corrupted. You can reset it using the PowerShell commands:
Remove-VMSwitch -Name "DockerNAT" -Force New-VMSwitch -Name "DockerNAT" -SwitchType NAT -NATSubnetAddress "10.0.75.0/24"
Wrapping up
By following these solutions, hopefully you can get to the bottom of your Docker Desktop starting forever and you can get back to working with your containers in your local development environment. Let me know if you have seen other workarounds or solutions make the difference in your environment.
The Problem
Recently I installed Docker for Windows on my local machine, running Windows 10 (latest version). It got installed successfully, as I installed using administrator privileges. But, soon I realized that it would not start completely. It was in Starting… for quite a long time.
Then I figured out why. It was because the WSL2 installation was not complete.
The Solution
You rock! The Docker container is up and running!
Please like and write comments if this solution works for you. If you have any queries, just leave a comment and I will be happy to help you.
Opinions expressed by DZone contributors are their own.
If you are using Docker Desktop on Windows 10, you might encounter an error message that says “Docker Desktop stopped”. This can be frustrating and prevent you from running your containers and applications. In this tutorial, I will explain what causes this error and how to solve it in four easy steps.
Step 1: Enable Virtualization in BIOS and Install WSL2 Linux Kernel Update
One of the common causes of the Docker Desktop Stopped error on Windows 10 is that your system does not have the required features to run Docker Desktop. These features are virtualization and WSL2. In this step, I will show you how to enable virtualization in BIOS and install WSL2 Linux kernel update on your computer.
Virtualization is a technology that allows your computer to run multiple operating systems or applications in separate environments. This is essential for Docker Desktop because it uses a virtual machine to host the Docker engine and run your containers. To enable virtualization in BIOS, you need to access the BIOS setup menu when you boot your computer. The exact steps may vary depending on your computer model and manufacturer, but usually you need to press a key like F2, F10, or Delete during the boot process. Once you are in the BIOS menu, look for an option called “Virtualization Technology”, “VT-x”, “AMD-V”, or something similar and enable it. Save the changes and exit the BIOS menu.
WSL2 stands for Windows Subsystem for Linux version 2. It is a compatibility layer that allows you to run Linux binaries natively on Windows 10. This is important for Docker Desktop because it uses WSL2 as the backend engine to run Linux containers on Windows. To install WSL2 Linux kernel update, you need to download it from this link: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi. Run the installer and follow the instructions. You may need to restart your computer again after the installation.
By enabling virtualization in BIOS and installing WSL2 Linux kernel update, you have fixed one of the possible reasons for the Docker Desktop Stopped error on Windows 10. In the next step, I will show you how to check your Docker settings.json file and set wslEngineEnabled to true.
Step 2: Check Your Docker Settings.json File and Set wslEngineEnabled to True
Another potential cause of the Docker Desktop Stopped error on Windows 10 is that your Docker settings.json file does not have the correct configuration for using WSL2 as the backend engine. The settings.json file is located at C:\Users\<username>\AppData\Roaming\Docker\
and contains various options for customizing your Docker experience.
To check your Docker settings.json file and set wslEngineEnabled to true, you need to open the file with a text editor like Notepad or Visual Studio Code. Look for a line that says "wslEngineEnabled": false
and change it to "wslEngineEnabled": true
. Save the file and close the editor.
By checking your Docker settings.json file and setting wslEngineEnabled to true, you have fixed another possible reason for the Docker Desktop Stopped error on Windows 10. In the next step, I will show you how to uninstall Docker Desktop 4.5.0 and install 4.4.4 instead.
Step 3: Try Uninstalling Docker Desktop 4.5.0 and Installing 4.4.4 Instead
Some users have reported that the Docker Desktop Stopped error on Windows 10 occurs only with Docker Desktop version 4.5.0 and that downgrading to version 4.4.4 solves the problem. This may be due to some bugs or compatibility issues with the latest version of Docker Desktop.
To uninstall Docker Desktop 4.5.0 and install 4.4.4 instead, you need to go to the Control Panel and select “Programs and Features”. Find Docker Desktop in the list of installed programs and click on “Uninstall”. Follow the prompts to remove Docker Desktop from your computer.
Then, download Docker Desktop version 4.4.4 from this link: https://desktop.docker.com/win/stable/amd64/69386/Docker%20Desktop%20Installer.exe. Run the installer and follow the instructions to install Docker Desktop on your computer.
By uninstalling Docker Desktop 4.5.0 and installing 4.4.4 instead, you have fixed another possible reason for the Docker Desktop Stopped error on Windows 10. In the next step, I will show you how to open Hyper-V Manager and connect to your local computer.
Step 4: Open Hyper-V Manager and Connect to Local Computer
The final potential cause of the Docker Desktop Stopped error on Windows 10 is that your Hyper-V Manager is not connected to your local computer. Hyper-V Manager is a tool that allows you to manage virtual machines and networks on your computer or remote servers. Docker Desktop uses Hyper-V Manager to create and run a virtual machine that hosts the Docker engine.
To open Hyper-V Manager and connect to the local computer, you need to press the Windows start button and type “hyper-v”. It will show you Hyper-V Manager in the search results. Open it and select “Connect to Server” from the right panel. A pop-up window will appear where you need to select “Local Computer” and click on “OK”.
By opening Hyper-V Manager and connecting to a local computer, you have fixed the final possible reason for the Docker Desktop Stopped error on Windows 10. You can now try running Docker Desktop again and see if it works without any issues.
You have now completed all the steps to fix the Docker Desktop Stopped error on Windows 10. I hope this tutorial was helpful for you. You have learned how to enable virtualization in BIOS, install WSL2 Linux kernel update package, check your Docker settings.json file, uninstall and install different versions of Docker Desktop, and open Hyper-V Manager and connect to local computer. If you have any questions or feedback, please let me know in the comments below.
Final words
I hope the above-mentioned suggestions will help you resolve the Docker Desktop Stopped error on Windows 10. This error can be annoying and prevent you from using Docker Desktop to run your containers and applications. By following the steps in this tutorial, you should be able to fix the error and enjoy Docker Desktop without any issues.
If you want to learn more about Docker and how to use it for various purposes, I recommend you to visit the “Docker tutorials for beginners” page. There you will find a series of tutorials that will teach you the basics of Docker, such as how to install Docker, how to create and run containers, how to build and share images, how to use Docker Compose and more. These tutorials are designed for beginners who want to get started with Docker and learn by doing.
Thank you for reading this tutorial. I hope you found it useful and informative. If you have any questions or feedback, please let me know in the comments below.