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.
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.
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.
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.
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 WindowsPowerShell 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.
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.
Information Security professional with 4+ years of experience. I am interested in learning about new technologies and loves working with all kinds of infrastructures.
51vote
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.