How To Install Docker on Windows 11

Facebook
Twitter
LinkedIn

Never miss a post!

Sign up for our newsletter and get FREE Development Trends delivered directly to your inbox.

You can unsubscribe any time. Terms & Conditions.
Categories

Docker has seen a rapid rise in popularity over the years. It has revolutionized traditional software development. Docker containers enable developers to scale up at an incredible rate and are easy to use. Docker allows you to reduce the size and footprint of your operating system by using containers. Containers make it easier for teams from different units such as development, QA, and operations to collaborate seamlessly across applications. Docker containers can be deployed anywhere on any machine, virtual or physical, and even in the cloud.

This article will show you step-by-step how to install docker under Windows 11.

Prerequisites for Installing Docker on Windows

  • Windows 11 64-bit Home or Pro version 21H2 or Higher, Enterprise or Education version 21H2 or Higher
  • You must enable Hyper-V and Containers Windows features.
  • To run WSL 2 under Windows 11, you need 4 GB of RAM 

In order to enable hardware virtualization support at the BIOS level, you must activate it in your BIOS settings. Make sure that Hyper-V or Containers are enabled in Windows.

Docker Desktop Before that, let me talk about Docker Desktop briefly.

Install Docker on Windows 11 installation steps

Open your favourite browser to install Docker. Chrome can be used, but you can use any browser. In the search bar, type Docker download. Click the first link you see. This should automatically take you to Docker’s official website. Once you have selected the link, choose Windows operating system to install it.

Alternatively, download the docker file from the website https://docs.docker.com/docker-for-windows/install/

Docker Desktop Installer.exe file will get downloaded and it may take some time, depending on your internet speed. Then, to execute the installation, double-click on Docker Desktop Installer.exe. Docker Desktop will start downloading the necessary packages.

 

Install docker

When prompted, ensure the Use WSL 2 instead of Hyper-V option on the Configuration page is selected or not depending on your choice of backend.

Add wsl2
Wait for the files to be unpackaged.

unpack files

Once you get the “Installation Succeeded” message, click on close and restart for the changes to take effect.

docker close and restart

When the system restarts, Go to Programs > Docker Desktop

You will be prompted to accept the terms.

Accept terms

 

Once you accept the terms, Docker Desktop will start.

Docker desktop starting

Click on Sign In, to login to Docker to continue to Docker Desktop.

login docker

In a couple of minutes, Docker Desktop will be up and running.

 

Open command prompt and run “docker -v” command. If you get the docker version, that means docker installation on Windows was successful.

docker installation successful

Run docker hello-world command to run a simple docker container on Windows.

Run hello world docker image

You can also run docker from the Docker Desktop interface.

For the first time when Docker Desktop starts, you will get the below screen. Click on Start to run a few docker command on Docker Desktop.

Start docker desktop

Click on the >> sign to move the command to the right side inside the Windows powershell and run it. This command will clone a github repository.

Clone a repository

Build Image

 

Once the cloning finishes, run the next command in the Docker Desktop tutorial to build the image.

build image 2

Then, run your first docker container on Docker Desktop.

Run docker container on desktop

Finally, tag and push the docker image so that others also can download and use it.

Tag and push

Once you click on Done, it will show you the message “You ran your first container image”

First container

Click on the Dashboard link and go to Containers, where you can see which all containers are running or exited on Docker Desktop.

Docker Dashboard

Final Thoughts

So that was all about how to install docker on windows. Docker Desktop is an amazing tool to use Docker on the Windows operating system. Go ahead, and setup Docker Desktop and get started with Docker on Windows 11.

 

Facebook
Twitter
LinkedIn

Our website uses cookies that help it to function, allow us to analyze how you interact with it, and help us to improve its performance. By using our website you agree by our Terms and Conditions and Privacy Policy.