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.
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.
Wait for the files to be unpackaged.
Once you get the “Installation Succeeded” message, click on close and restart for the changes to take effect.
When the system restarts, Go to Programs > Docker Desktop
You will be prompted to accept the terms.
Once you accept the terms, Docker Desktop will start.
Click on Sign In, to login to Docker to continue to Docker Desktop.
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.
Run docker hello-world command to run a simple docker container on Windows.
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.
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.
Once the cloning finishes, run the next command in the Docker Desktop tutorial to build the image.
Then, run your first docker container on Docker Desktop.
Finally, tag and push the docker image so that others also can download and use it.
Once you click on Done, it will show you the message “You ran your first container image”
Click on the Dashboard link and go to Containers, where you can see which all containers are running or exited on Docker Desktop.
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.