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 Windows machine as well as we will learn 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 Windows machine .
Let’s start the installation steps.
Step 1 – Download Docker Desktop
The very first step is to download the installation file from here (Docker Desktop).
You can download docker for Windows, Mac or Linux based on your machine specification.
Step 2 – Installation
Double click on installation file and run it.
Proceed the installation by clicking yes.
Select depicted component and click on OK.
Then installation will start. It may take few minutes.
After the installation completion restart the machine by clicking on Close and restart.
Then, you can see the Docker icon in your Desktop, or you can search it from windows search.
While opening Docker, If you get error like WSL 2 installation is incomplete as shown below then, click on hyper link of the error message and download the Windows Subsystem for Linux (WSL2) from that hyperlink and install it. After installation restart the computer.
Step 3- Checking WSL 2 Setting
Open Docker Desktop and click on setting icon and then select “Use the WSL 2 based engine” as shown below.
Then, go to Resources->WSL Integration and Select “Enable integration with my default WSL distro”.
Subsequently, open and check your Docker whether it is running properly. One way to find docker status is: you can check whale icon in status bar. If the whale icon is stable means Docker is up and running. It can be accessed from terminal window.
If you get screen like below then copy the command and execute it on cmd line then Docker desktop will start.
Docker Desktop for Windows throwing Error
Follow below troubleshooting steps if you still face issue 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 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.
Step 2- Enable Hyper-V and Containers
Another step is to verify the Windows Features are enabled:
- Hyper-V and 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.
Step 3- Verify Virtualization is enabled from Task Manager
Hardware virtualization is most powerful feature of Windows 10. This enables to create virtual machine on your system which is completely separated from main system.
To verify virtualization right click on Task bar and open the Task Manager. Go to performance and then CPU to verify that whether Virtualization is enabled or not. If virtualization is disable Docker Desktop cannot start.
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.
Hence, this article has described the steps to install and fix the issue for Docker Desktop in Windows 10 pro machine. I hope, this helps to install and resolve the Docker Desktop running issue in your Windows machine.