How to install Docker on Windows 10/11 STEP BY STEP

Spread the love

As the importance of Docker in our daily development tasks continues to grow, an increasing number of people are seeking to install Docker on Windows. In this comprehensive guide, we will walk you through the steps to effortlessly install Docker on both Windows 10 and Windows 11.

Step 1: Downloading Docker

Make sure to visit the official Docker website as your primary destination for downloading Docker Desktop. It’s essential to note that Docker Desktop is exclusively designed for Windows 10 and Windows 11, and not compatible with Windows Server.

Also Read: How To Generate Invoice PDF In Laravel 10

image How to install Docker on Windows 10/11 STEP BY STEP

Now, proceed by initiating the downloaded installer and commence the installation process.

image 1 How to install Docker on Windows 10/11 STEP BY STEP

Step 2: Docker Configuration

Docker relies on a virtualization engine for Linux execution on Windows. Docker strongly recommends leveraging WSL 2 for this purpose.

image 2 How to install Docker on Windows 10/11 STEP BY STEP

Step 3: Install Docker on Windows

Be sure to wait a moment after clicking ‘Ok‘ for optimal results.

image 3 How to install Docker on Windows 10/11 STEP BY STEP

Step 4: Restart Your Windows

At this juncture, it’s essential to restart Docker to ensure it properly registers with the Windows operating system.

Also Read: How to get .env variable in blade and controller in LARAVEL?

image 4 How to install Docker on Windows 10/11 STEP BY STEP

Step 5: License agreement

After restarting, Docker will automatically initiate, and you should expect to see the window depicted below:

image 5 How to install Docker on Windows 10/11 STEP BY STEP

In summary, it’s important to note that Docker retains its no-cost status when employed for personal or small-scale business applications. However, if you’re part of a sizable organization, we recommend reaching out to your IT department for clarification on Docker’s licensing agreement.

Step 6: WSL 2 installation

When you agree to the license conditions, the Docker Desktop window will promptly open. However, our setup isn’t complete. We must also initiate the installation of WSL 2, our selected virtualization engine. Please refrain from clicking “Restart” just yet!

Also Read: How to Create Custom Helper Functions in LARAVEL 10

image 6 How to install Docker on Windows 10/11 STEP BY STEP

To access WSL 2, simply click the provided link within the displayed pop-up window and initiate the download process.

image 7 How to install Docker on Windows 10/11 STEP BY STEP

Open the installer.

image 8 How to install Docker on Windows 10/11 STEP BY STEP

To initiate the installation process for the Windows Subsystem for Linux (WSL), simply click on the “Next” button.

image 9 How to install Docker on Windows 10/11 STEP BY STEP

The installation should be completed within a brief period, allowing you to simply click on the “Finish” button.

image 10 How to install Docker on Windows 10/11 STEP BY STEP

If the Docker Desktop dialog box remains visible in the background, consider clicking on the “Restart” option. Alternatively, if it’s not there, proceed with a standard computer restart.

image 11 How to install Docker on Windows 10/11 STEP BY STEP

Step 7: Starting Docker Desktop

  1. Access Docker Desktop: To begin using Docker Desktop, simply open it from the shortcut on your desktop. If it doesn’t launch automatically, follow these steps.
  2. Initiate Initial Orientation (Optional): If desired, you can kickstart the initial orientation by clicking on the “Start” option.

Also Read: how to Create Custom Artisan Command in LARAVEL

image 12 How to install Docker on Windows 10/11 STEP BY STEP

Your Docker Desktop interface should now be visible, as depicted.

image 13 How to install Docker on Windows 10/11 STEP BY STEP

Step 8: Testing Docker

Enter the following command in your chosen command-line software for optimal results.

docker run hello-world

Experience a Smooth Start: Get Started by Downloading and Running the hello-world Docker Image for a Quick Functionality Check.

image 14 How to install Docker on Windows 10/11 STEP BY STEP

Step 9: Automatically start Docker

While this step is considered optional, if you frequently work with Docker, you may find it beneficial to configure Docker Desktop to automatically launch when Windows starts.

Also Read: How to Rollback Migration in Laravel?

As depicted in the screenshot provided, you have the option to activate this feature through the settings menu.

image 15 How to install Docker on Windows 10/11 STEP BY STEP

Troubleshooting — Issues installing WSL 2

When launching Docker Desktop for the first time, you may encounter the following potential issue:

Encountered an Issue Deploying Docker Desktop to C:\Users\valentin\AppData\Local\Docker\wsl\distro? Learn How to Fix It!

If you’re facing deployment issues while trying to set up Docker Desktop at C:\Users\valentin\AppData\Local\Docker\wsl\distro, don’t worry; we’ve got you covered!

This common problem can be resolved by following a few simple steps.

Enable the Virtual Machine Platform Windows Feature: To get Docker Desktop up and running smoothly, make sure to enable the Virtual Machine Platform Windows feature. Additionally, ensure that virtualization is enabled in your BIOS settings. This step is crucial for a seamless deployment.

WSL System Access Rights: Sometimes, WSL (Windows Subsystem for Linux) access rights may not be configured correctly. This can occur after waking your computer from sleep or when not connected to your domain/active directory. If you face this issue, a quick fix might be to reboot your computer.

Reinstall WSL if Necessary: If rebooting doesn’t resolve the problem, consider fully reinstalling WSL. This can be a more involved process but may be necessary to ensure proper functionality.

Last Resort: Uninstall/Reinstall Docker Desktop: As a final option, you can try uninstalling and then reinstalling Docker Desktop. This can help resolve any lingering issues and provide a clean slate for your Docker environment.

For detailed instructions and troubleshooting tips, visit our official documentation at https://aka.ms/wsl2-install.

We’re here to assist you in getting Docker Desktop up and running smoothly on your Windows machine. Don’t let deployment challenges hold you back!

Regrettably, troubleshooting this issue poses a challenge.

Option 1: Enable the Virtual Machine Platform

Ensure that your Windows setup includes the Virtual Machine Platform feature. You can swiftly verify its status by accessing the “Turn Windows features on or off” menu within your Control Panel.

image 16 How to install Docker on Windows 10/11 STEP BY STEP

Ensure that the Virtual Machine Platform feature is activated in your list of available functionalities.

Also Read: Yajra Datatable using LARAVEL 10

image 18 How to install Docker on Windows 10/11 STEP BY STEP

Option 2: You are running Windows on Microsoft Azure

Ensure that your Windows instance on the Microsoft Azure cloud is equipped with the right virtual machine size. Specifically, you’ll need a Dv3 VM size as these are the only sizes that provide support for Hyper-V containers and nested virtualization.

Instances like ‘Standard D2 v2‘ may not be suitable. Consider using alternatives such as ‘Standard D2s v3,’ for better performance.

Opt for this option to initiate WSL 2 execution.

I hope it can be useful to you.

Leave a Comment