In this article, you will learn how to install docker on windows 10 with step by step guide.
After reading this, you will have docker running on your windows 10 system.
To install docker on windows, you need to install Docker desktop using the following steps.
1. Install WSL 2
WSL stands for Windows Subsystem for Linux.
With WSL, you can run complete linux environment on a Windows system, instead of installing a virtual machine.
You can also install Docker on windows 10 using Hyper-V but that is now deprecated. With WSL, you can run both windows and linux containers on the same window machine.
Further, there are a few benefits of using docker with WSL,
A. Docker desktop uses dynamic memory allocation of WSL to consume only required memory, thus, saving memory consumption.
B. Time required to start Docker with WSL backend is significantly faster.
Following are the system requirements for installing WSL on Windows.
- Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
- Windows 10 64-bit: Home or Pro 2004 (build 19041) or higher, or Enterprise or Education 1909 (build 18363) or higher.
- Hardware requirement:
- 64-bit processor with Second Level Address Translation (SLAT).
- 4GB system RAM.
- BIOS-level hardware virtualization support must be enabled in the BIOS settings.
To install WSL, open command prompt or Windows Powershell in administrator mode and execute the below command:
wsl –install
This will enable required components, download linux distribution(Ubuntu) and install linux kernel on windows system. Also, WSL 2 is enabled by default.
Below is the output when the above command is executed on Windows command prompt
Restart the system after installing WSL.
Step 2: Download docker for windows 10
Download Docker Desktop for Windows from this link. It will look as below.
Click this button, it will download an executable file.
Once the file is downloaded, double click and follow installation instructions as shown below.
Finally, this is the window that appears after the installation is successful.
Click “Close and log out” button and login again into Windows 10.
Chances are that docker service will automatically run on startup. You can look for the status of its service by right clicking on docker icon as shown below.
If it is not running, then click on Start option.
Once the service shows started, open a command prompt and execute docker command, it will display all the options available with this command.
That’s it, you have successfully installed docker desktop on Windows 10 operating system.