How to Install Docker on Windows 10?

Photo of author

By admin

Practically, all the top organizations around the world have digital services that depend on Docker containers for running their applications.

With a Windows installer and a well-documented installation procedure, Docker on Windows has become one of the famous containerization platforms.

To set it up, most of us download and use the executable file available on the official website of the containerization platform, but you don’t have to do all that.

Just use the command line and ensure that the WSL (Windows Subsystem for Linux) is already enabled on your device, then follow the given steps, and you are done.

What is Docker?

Docker is an open-source project that makes it possible to build, run, manage, and distribute far more apps. Also, Docker makes it easy to create containers and container-based apps.

Originally built for Linux, now Docker runs on Windows and macOS as well. Before heading towards understanding how Docker works, let’s first know the required components you would use to create containerized applications in Docker.

Docker Architecture

As evident in this picture, every app runs on separate containers and has its own set of dependencies and libraries. With this, developers can easily build apps without the fear of interfering with one another.

How to Install Docker on Windows 10?

Components Installed with Docker

1. Docker Engine

The Docker engine contains the Docker daemon, REST API for interacting with the Docker daemon, and a CLI client that communicates with the daemon. Docker daemon accepts Docker commands – such as Docker run and Docker build – from the Docker client.

2. Docker Compose

This component is used to run multiple Docker containers at once by running a single command, which is docker-compose up.

3. Docker Machine

To install the Docker engine, we need to use a Docker machine. Docker Machine has its own command-line client docker-machine and the Docker Engine client, docker.

4. Kitematic

This is an open-source project built to simplify the use of Docker on Windows. It provides an interactive user interface for running Docker containers although It helps to automate the installation of Docker.

5. Boot2Docker ISO

It is a tiny Linux distribution that will help you to run Docker on Windows.

6. VirtualBox

It is an open-source hypervisor for Windows used to emulate operating systems.

Pros of Working with Docker on Windows

  • Maintaining parity between testing and production deployment.
  • Running different versions of the same application.
  • Use the same toolset on both Windows and Linux.
  • Hypervisor containers provide a solution for enhancing the security of your Windows app deployments.
  • Enables faster software delivery cycles.
  • Facilitates application portability.
  • Solves different environment-based problems.

For creating an optimized and fast container environment to run various virtual machine images, you will need to learn the commands to use on Powershell for installing Docker on Windows 10 using WSL 2 support.

This is what we are going to explain in this blog. So without wasting any more time, let’s deep dive to know how to install Docker on Windows.

Why Utilize a WSL to Install Docker on Windows?

WSL makes it very easy to operate Docker without Hyper-V or VirtualBox. The Windows Subsystem for Linux comes with the ability to run a full-fledged Linux kernel using WSL 2. The best part of WSL is that it is already available in Windows 10.

Prerequisites for Installing Docker on Windows 10

  1. 64-bit Windows 10 Pro, Enterprise, and Education; 1511 November update, Build 10586 or later
  2. Administrator access to PowerShell
  3. Docker
  4. Chocolatey
  5. WSL
  6. A reliable Internet connection

1. Get Windows 10 Pro Ready

Before heading to install Docker on Windows 10, just make sure your Windows 10 is Windows 10 Pro otherwise you cannot install Docker on Windows 10.

2. Time to Get Admin Access

To run the installation command for Docker, Administrator access to PowerShell is required. After getting the admin access just right-click on the Windows 10 Start button and lastly, click on the “Windows PowerShell (Admin)”.

3. Download Docker

You can directly install Docker from the Docker Store. You will need to create an account for Docker download. Having an account for Docker will allow you to download Docker images in the future.

Download Docker images

Just go to the Docker official page and Click on Products -> Docker Desktop on the menu bar. You will now be at the Docker Desktop product page, which looks like this:

Docker Home page

Here you will have a button labeled “Download Docker Desktop for Windows”. Just click on it.

Download Docker Desktop for Windows

Note: The size of this installer file for Windows is around 914 MB.

4. Install Docker Desktop on Windows

To run the Docker installer, simply double-click the Docker Desktop Installer.exe file.

You can get it from Docker Hub if you haven’t downloaded the Docker installer (i.e. Docker Desktop Installer.exe). Though it downloads to your Downloads folder by default, you can run it from the recent downloads bar at the bottom of your web browser, if using Google Chrome.

The Docker installation will start now. Now you need to:

  • Ensure the Enable Hyper-V Windows Features option is selected on the Configuration page.
  • Authorize the installer and proceed with the installation, follow the instructions on the installation wizard.
  • Click Close to complete the installation process once the installation is successful.
  • You must add the user to the docker-users group if your admin account is different from your user account. After that, simply Run Computer Management as an admin and navigate to:

Local Users and Groups > Groups > docker-users

  • After doing so, add the user to the group. To do so right-click on the add option. For the changes to take effect, log out, and log back in.

5. Install Chocolatey

Use this command to install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘‘))

Now make sure that Chocolatey is installed. Go ahead and close the PowerShell and reopen it as Admin and check if Chocolatey is installed by typing Choco? in the terminal window:

Next, run Chocolatey in your PowerShell with admin rights.

6. PowerShell

After completing the above steps, everything is ready on Powershell, and you can install Docker on Windows 10 Pro or Windows Server 2019.

Now, use the choco install docker-desktop –pre command.

While running the above command, it will ask for your permission to install the packages. To allow it, just type A and hit Enter.

To run the open-source containerized platform, just double-click on the Docker icon on your desktop or system tray.

Docker icon

7. Configure WSL 2 Distro

After completing the Docker installation, Docker will install its own WSL 2 Linux distro on your device and set it as the default one. Hence, users can easily initiate it using PowerShell.

Just go to the Docker Desktop app, click on the Resources option given on the left side, and simply select the WSL integration option. On the off chance, you might need to enable the Docker support to other available WSL Linux distros on your system.

By doing so, you will find all installed and available WSL distros there. To enable Docker support, use the toggle button present in the front of the Linux distro. Now, you can easily run all the Docker commands.

How Does Docker Work?

Docker works a lot similar to Visual Studio Code’s WSL remote development support. The Docker command-line interface running on the Docker host machine executes commands within the Docker Integration Package, which runs on the remote WSL VM.

Docker Working

There’s no need for the Hyper-V, as Docker runs directly within WSL and all Linux containers run within the Linux userspace on Windows for enhanced performance and compatibility.

How to Uninstall Docker Desktop?

To uninstall Docker Desktop from your Windows machine:

  • Go to the Windows Start menu and navigate to Settings > Apps > Apps & features.
  • From the Apps & features list, Select Docker Desktop and then select Uninstall.
  • To confirm your selection, click Uninstall.

The Final Take

Well, we shared everything that a person should know and follow for successfully installing Docker on Windows. We hope that this blog helps you.

If you still have any confusion or concern about installing Docker on Windows or you find something wrong in this article, let us know by leaving your query in the comments section below. We will get back to you at the earliest possible.

Frequently Ask Questions

1. How do I install free Docker on Windows 10?

Docker is free for installation on Windows by smaller companies (having less than 250 employees and less than $10 million in annual revenue), private use, educational purposes, and non-commercial open source projects. Larger enterprises have to take a paid subscription for professional use. The effective date of these terms is August 31, 2021.

2. How do I use Docker on my Desktop Windows 10 home?

Docker only supports Docker Desktop on Windows for those versions of Windows 10 that are currently within Microsoft’s servicing timeline. The containers and images created with Docker Desktop on Windows are shared between all user accounts on systems where it is installed. If you are running Windows 10 Home (starting with version 1903), you can install Docker Desktop for Windows with the WSL 2 backend.

3. How do I know if Windows Docker is installed?

To see if you have Docker installed on your Windows system, run the command docker ps or docker info on a terminal screen to check if it is installed and running or not. If the command is not found, you may need to install Docker first.

4. Can I run Docker Desktop on Virtualized hardware?

No, currently this is unsupported and against terms of use.

5. Where does Docker Desktop get installed on my Windows machine?

By default, Docker Desktop is installed at the following location on a Windows machine: C:\Program Files\Docker\Docker

Leave a Comment