Windows OS

Resolved: “Docker error – the docker daemon is not running”

Docker is a freely available, open-source cross-platform that made development predictable and efficient. Docker can be used to deploy and test your software quickly. It provides a container that is an isolated environment in which developers can package and run applications. The Docker daemon is a backend process that maintains the containers on a host. It is primarily used to get requests from APIS and act accordingly. Sometimes we may face the error “the Docker daemon is not running” this may occur due to a missing Linux kernel on Windows or the Docker service not running.

In this write-up, we will demonstrate the solution to resolve the “docker daemon is not running” Docker error on Windows.

How to Fix the Docker Daemon is not Running Error on Windows?

Docker provides us with an isolated development environment to deploy and test code/software. Occasionally, the user may get the error “the docker daemon is not running” because of missing dependencies. To use Docker Daemon the WSL must be activated on your machine.

The following steps are carried out to resolve “the docker daemon is not running”:

Step 1: Open Windows PowerShell

Open the Windows PowerShell from the “Startup” menu by searching “PowerShell”:


Step 2: Check Docker Version

Then, check the Docker version to check if Docker is installed and accessible or not:

> docker -- version

 
The below output clears that the Docker is installed on the system.


Step 2: Check the Docker

Next, run the Docker image “Hello-World” using the provided command to check whether the Docker daemon is working or not:

> docker run hello-world

 

Step 3: Check Docker Desktop Service

Open the services app to check if the service of Docker Desktop is running or not. To do so, open the Services application by searching “Services” in the “Startup” menu:


Next, check if the Docker Desktop service is running or not. You can see that the Docker Desktop service is running:


Step 4: Download and Install Update WSL

Next, click on the below-provided link to download the update installer of the WSL (Windows Subsystem for Linux):

https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

 
Next, go to the “Downloads” directory to check whether the WSL is downloaded or not. Double-click on the installer to install the package:


After that, it will start updating WSL. You can see that our WSL (Windows Subsystem for Linux) is already up to date. Hit the “OK” button:


Next, click the “Finish” button to close the WSL setup wizard:


Step 5: Verify the Error is resolved

Once you have updated the WSL, run the Docker image “Hello-World” command again to check whether the error is resolved or not:

> docker run hello-world

 

The above-mentioned output indicates that we have successfully resolved the specified error on Windows.

We have compiled the solution to fix the Docker-specified error on Windows.

Conclusion

The Docker daemon is a backend service of Docker that controls the Docker container. To resolve the Docker daemon is not running error, you first need to verify if the service of Docker Desktop is running or not. If the service is running then update the WSL package. After doing so, the specified error will be resolved.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.