How To Install Docker Desktop And Troubleshoot Issues In Windows Machine

Introduction

Docker enables us to build and share containerized applications and microservices. In this article, we will learn how to install and make ready a docker desktop in a Windows machine and learn how to fix the issue for Docker container not running properly in the Windows environment. For this article, I have used Windows 10 pro machine to install Docker Desktop and all screenshots are taken from the Windows machine.

Let’s start the installation steps,

Step 1 – Download Docker Desktop

The very first step is to download the installation file. You can download it from here.

You can download Docker for Windows, Mac, or Linux based on your machine specification.

Step 2 – Installation

Double click on the installation file and run it.

Proceed with the installation by clicking yes.

Select depicted component and click on Ok.

Then the installation will start. It may take a few minutes.

After the installation, completion restarts the machine by clicking on Close and restart.

Then, you can see the Docker icon on your Desktop, or you can search it from Windows search.

While opening Docker, If you get an error like WSL 2 installation is incomplete as shown below then,click on the hyperlink of the error message and download the Windows Subsystem for Linux (WSL2) from that hyperlink and install it. After installation restarts the computer.

Step 3- Checking Setting WSL 2

Open Docker Desktop and click on the setting icon and then select “Use the WSL 2 based engine” as shown below,

How to Install Docker Desktop and Troubleshoot Issues in Windows Machine

Then, go to Resources->WSL Integration and Select “Enable integration with my default WSL distro” and click Apply & Restart.

How to Install Docker Desktop and Troubleshoot Issues in Windows Machine

Subsequently, open and check your Docker whether it is running properly. One way to find docker status is: you can check the whale icon in the status bar. If the whale icon is stable means Docker is up and running. It can be accessed from a terminal window.

Docker Desktop for Windows throwing Error

Follow the below troubleshooting steps if you still face issues running Docker in Windows 10 machine.

Step 1 – Run Docker Services

Type and search Services in the windows search box or open run then type services.msc and click Ok. Then you will see a list of services available. Go to Docker and check whether Docker Desktop Service is running or not. If it is not running then right-click and click on Start.

How to Install Docker Desktop and Troubleshoot Issues in Windows Machine

Step 2- Enable Hyper-V and Containers

Another step is to verify if the Windows Features are enabled:

  • Hyper-V and containers
  • Containers

Type the Windows Feature in Windows search and go to Turn Windows features on or off.

Select Containers and Hyper-V as depicted below and click on OK.

How to Install Docker Desktop and Troubleshoot Issues in Windows Machine

Step 3- Verify Virtualization is enabled from Task Manager

Hardware virtualization is the most powerful feature of Windows 10. This enables you to create a virtual machine on your system which is completely separated from the main system.

To verify virtualization right click on Taskbar and open the Task Manager. Go to performance and then CPU to verify whether Virtualization is enabled or not. If virtualization is disabled Docker Desktop cannot start.

How to Install Docker Desktop and Troubleshoot Issues in Windows Machine

If the virtualization is disabled in your machine then you need to enable it from BIOS Settings. Note that Windows 10 Home edition doesn't support Hyper-V feature only Windows 10 Enterprise, Pro, or Education support it. Additionally, virtualization depends upon the hardware specification.

How to Install Docker Desktop and Troubleshoot Issues in Windows Machine

Conclusion

Hence, this article has described the steps to install and fix the issues for Docker Desktop in Windows machines. I hope this helps to install and resolve the Docker Desktop issue in your Windows machine.


Similar Articles