How to Install and Run Docker on Windows 10 / 11 (Tutorial)

How to Install and Run Docker on Windows 10 / 11 (Tutorial). First of all, docker is a tool that creates isolated environments for applications, guaranteeing that the application is always in the same state.

Also, Docker runs apps in containers. Containers are lightweight, purpose built virtual environments that have everything you need to run your code, including the operating system, system tools, and applications.

With containers, it’s easy to make the process of developing and delivering distributed applications easier.

In general, Docker do not need to install a virtual machine or fix up an entire operating system just so you run a single application.

In this article, you learn about Docker, its features, and its advantages. You also learn how to install and run Docker on Windows 10 or 11.

What is Docker

Subsequently, Docker is an open source program for creating, deploying, and running applications with containers.

Docker lets you run applications in lightweight containers that have everything they need to run, including runtimes, system libraries, and environment variables. Therefore, containers are isolated from the underlying infrastructure by default.

Docker containers are created from any application and runs on almost any infrastructure. This also guarantees that it will always run the same, regardless of its environment.

With Docker, it is easy to get started with containers and even easier to deploy your applications on a scalable platform.

Surely, Docker has become synonymous with container technology, a method of packaging applications as standalone entities that run on servers and accessed via the internet. As such, organizations that want to switch to cloud native development and hybrid multi cloud environments use this platform a lot.

Simply put, it lets them package up an application and its dependencies in a container that run anywhere infrastructure is provided by an orchestrator like Kubernetes or Swarm.

In contrast, from applications running on bare metal servers, where it was hard to standardize host OSs and configuration details for similar apps across environments, to those running on virtual machines with multiple different workloads vying for RAM resources and causing performance issues, Hence, Docker containers solve all these problems.

Docker Features

Here are some features of Docker:

Docker Advantages 

Docker offers several advantages, some of which are as follows:

  • Docker virtualization
  • Rapid deployment.
  • Isolation.
  • Portability across machines.
  • Scalability.
  • Multi Cloud platforms are supported.
  • Security.
  • Rapid Performance.
  • Support for remote connections using SSH.

Continue following this post to learn how to Install and Run Docker on Windows 10 / 11 .

Install and Run Docker on Windows 10 / 11

Prerequisites and Specifications

  • Windows 10 or 11 with the 64-bit operating system. 
  • 2004 or higher versions of Pro.
  • Version 1909 or later for Enterprise or Education Version.
  • When selecting Windows 10 or 11, 64-bit, a higher level of translation is required.
  • 4 GB of RAM or higher (but not less)
  • BIOS settings should have hardware virtualization support enabled. 
  • Windows supported by Microsoft needs to be updated if computers have older versions of Windows.

Download Docker for Windows

First of all, we need to download Docker Desktop from the official Docker website. In particular, docker desktop is only available for Windows 10 and Windows 11, not Windows Server, so please keep that in mind.

To download Docker Desktop, go to the Docker website and click on Download for Windows option. This automatically begins to install an executable file called Docker Desktop Installer.

Once the download is finished, close the site.

Enable Virtual Machine Platform Feature

You need to enable the Virtual Machine Platform feature on your system.

Go to the Start menu, search, and click on Turn Windows features on or off.

This displays several features with a check box next to them. Navigate to the Virtual Machine Platform, check the box next to it, and click OK.

This feature will require a restart of your system. Proceed with the restart to continue.

Install Docker on Windows 10/11

Navigate and run the Docker Desktop Installer that we downloaded earlier.

As soon as you run the installer, it will take you to the configuration. Check the boxes for Use WSL 2 instead of Hyper-V (recommended) and Add shortcut to desktop, then click Ok.

Docker Desktop Installer then unpacks and installs the required files. This process may take a while, so be patient with it.

Once the installation is complete, the installer shows you the installation success message and ask for a restart. Click on Close and restart to proceed.

Run Desktop Docker on Windows 10/11

Once you have restarted your system, the Docker Desktop typically opens up automatically. In case it does not open automatically, run it from its desktop shortcut.

Next, proceed with accepting the service or license agreement.

Docker starts up and most likely shows the warning that WSL 2 installation is incomplete and provide a link for resolution and assistance with this issue.

Don’t click on Restart yet; click on the provided link. This link will take you to the download page for the Linux kernel update package.

Click on the WSL2 Linux kernel update package for x64 machines. This will download a file called wsl_update_x64.msi. Open the file once it is downloaded and set up WSL.

Click on Next in the setup wizard to install WSL 2, and then click on Finish.

Alternatively, you can also run the wsl –update command in Windows PowerShell to install WSL 2.

Next, go back to the warning dialog WSL 2 installation is incomplete and click on Restart.

After restarting, you can see the Docker Desktop screen with Containers and Guides displayed.

Run Sample Containers and Verify Docker Installation

Launch your preferred command line tool and enter the following command:

					run docker hello-world

This will download and run the hello-world Docker image.

Let’s also run a Dockerized Web Server command from PowerShell or cmd.exe:

					docker run -d -p 80:80 --name webserver nginx

If your host does not already have it, Docker downloads and starts nginx from Docker Hub. When the download is finished, navigate to Docker Desktop and click to start the web server container. It will take you to the window with the Welcome to nginx! message. 

These actions are just a quick check to make sure every component is working properly.

Configure Docker to Run on Login

This step is optional, but if you work a lot with Docker, you may want to configure Docker Desktop to start automatically when you boot up Windows.

You can turn this on by clicking the gear icon in the top toolbar, which will open the settings.

Check the Start Docker Desktop when you log in option under the General settings, click on Apply and restart.

That’s it for learning how to Install and Run Docker on Windows 10 / 11. We shall summarize this article blog.

How to Install and Run Docker on Windows 10 / 11 (Tutorial) Conclusion

Finally, Docker containers are lightweight, purpose built virtual environments that have everything you need to run your code and isolate your apps from the host operating system, making it easier to deploy, distribute, migrate, and scale without worrying about individual servers.

Docker is a tool that allows you to reduce the operational overhead of running and orchestrating containerized applications by providing an abstraction layer between your application and its operating environment. This tool offers security and consistency for your software.

With the help of this tutorial, you can containerize your applications with Docker so you can run them on Windows.

Explore our Docker section to learn more.

Avatar for Sobia Arshad
Sobia Arshad

Information Security professional with 4+ years of experience. I am interested in learning about new technologies and loves working with all kinds of infrastructures.

5 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x