Docker Desktop Startup Error on Windows

Ken UdehKen Udeh
4 min read

The Docker Desktop app for Windows can sometimes behave unexpectedly. You could successfully install the app, but have difficulty getting the Docker engine to start. This guide delves into the reason behind such behaviour, and offers effective solutions to it.

an image showing the "failed to start the docker engine error"

The Problem

By default, Windows cannot run Linux-based applications, like Docker Desktop, without some additional features enabled. Running such applications without the enhancements will lead to errors such the one seen with Docker Desktop, as the environments are fundamentally different.

The Solution

To set things right, you need to enable Windows’ virtualization, turn on the virtual machine platform, and install the Windows Subsystem for Linux (WSL). First, virtualization:

Step 1: Enable Virtualization

The means of enabling virtualization vary by PC manufacturers and models. For example, here’s how to enable it on HP EliteBooks:

  1. Restart your device and press F10 during booting to enter BIOS

  2. Navigate to the Advanced tab

  3. Under the Advanced tab, select System Options, then press Enter

  4. In the System Options window, check the Virtualization Technology (VTx) box and click Save

  5. Press F10 to exit BIOS

As previously stated, this process varies slightly for other models from HP. Other PC brands such as Dell, Acer, Asus, and Lenovo all have their respective methods for enabling virtualization.

Step 2: Turn on Virtual Machine Platform

In addition to virtualization, you also need to enable the Windows Virtual Machine Platform. Here’s how to do that:

  1. Click Start, then enter Windows features in the search field

  2. From the search result, select Turn Windows features on or off. Alternatively, go to Control Panel > Programs > Programs and Features > Turn Windows Features On or Off.

  3. In the Windows Features window, locate Virtual Machine Platform and select it.

  4. Select OK to save your changes.

Step 3: Install the Windows Subsystem for Linux (WSL)

To install WSL, follow the steps below:

  1. Enter “PowerShell in Windows’ search bar, and identify Windows Powershell in the search result

  2. Right click on the Windows Powershell entry and select “Run as administrator” to open the app

  3. Inside PowerShell, run the command wsl --update to install WSL

  4. Wait for the installation to complete, then run wsl --version to confirm the installation status. You should get an output containing a version number if it succeeded

  5. Run wsl --set-default-version 2 to set WSL 2 as your default version

  6. Type exit and press Enter to close PowerShell.

Step 4: Restart your device (optional)

Restart your device, then open the Docker Desktop application again.

Additional Troubleshooting Tips

The Docker Engine should now be starting as expected. However, if the error persists even after completing the steps in the previous section, consider the following:

  • Enable Hyper -V: Hyper -V is an alternative to WSL. Docker recommends WSL over it, but you may try it to see if it'll help. To enable Hyper-V, do the following:

    1. Go to Control Panel > Programs > Programs and Features > Turn Windows Features On or Off.

    2. In the Windows Features window, find Hyper -V and select it.

    3. Select OK to save your changes.

    4. Restart your device, then open Docker Desktop.

  • Downgrade Your App: Your device may not support your current Docker Desktop version, so downgrading to an older one might help. Here is a link to different versions of the app.

Future Issues with the Docker Engine

If you ever encounter future issues with the Docker Engine, take the following steps:

  1. Reset the Docker Desktop app to default settings

  2. Restart the app

  3. Restart your computer (optional)

To Summarize

This guide offered practical steps to get your docker engine started on Docker Desktop, so you can run or manage containers and images. However, if you still encounter the error, there are likely other underlying causes, and you should explore the Docker community forum and other recourses for more insights.

0
Subscribe to my newsletter

Read articles from Ken Udeh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ken Udeh
Ken Udeh

API technical writer.