How to Install Docker on Windows 11: A 5-Minute Guide (2025)

Your 5-Minute Launchpad into Docker on Windows 11

Docker is an open platform that has fundamentally changed modern software development. It leverages containerization to package applications and their dependencies into lightweight, isolated, and portable units called containers. This technology elegantly solves the classic and often frustrating “it works on my machine” problem by ensuring that an application runs consistently across development, testing, and production environments. By the end of this comprehensive guide, any developer or tech enthusiast will have a fully functional Docker environment on their Windows 11 PC, ready to build, share, and run containerized applications with confidence.   

The “5-minute” claim in the title refers specifically to the active installation and command execution time a user will spend. It is important to set realistic expectations: passive waiting periods for software downloads, system reboots, and the initial, one-time setup of the Windows Subsystem for Linux (WSL) are not included in this estimate. This guide is structured to make the active process as swift and error-free as possible by addressing prerequisites thoroughly upfront.  

This report will provide a complete roadmap for the installation process. It begins with a critical pre-flight check of system requirements, moves to the installation of WSL 2 and Docker Desktop, covers verification of the setup, and culminates in launching a practical, real-world Nginx web server container.   

To begin, it is useful to understand a few core Docker concepts. An Image is a read-only blueprint or template that contains the application code, a runtime, system tools, and all necessary dependencies. A   

Container is a live, running instance of an image. It is the self-contained environment where the application executes.   

Docker Desktop is the easy-to-install application for Windows that bundles the Docker Engine (the core background service, or daemon), the command-line interface (CLI) for interacting with it, and other essential tools into a single, user-friendly package. The primary benefit of this ecosystem is the consistency it provides, which dramatically accelerates development workflows and reduces environment-related bugs.   

Pre-Flight Checklist: Is Your Windows 11 PC Ready for Docker?

Dedicating a few minutes to this pre-flight checklist is the single most important step to ensure a smooth and rapid installation. This section is designed to proactively address the most common points of failure, preventing hours of troubleshooting cryptic error messages later. A significant number of installation failures are not due to Docker itself but stem from a cascade of underlying system misconfigurations. For instance, a disabled virtualization setting in the computer’s firmware will prevent the Windows Subsystem for Linux (WSL 2) from functioning correctly. This, in turn, will cause the Docker Desktop installation to fail with vague errors like “Unexpected WSL error” or “This app can’t run on your PC”. This checklist breaks that chain of failure before it begins, transforming a potentially frustrating experience into a straightforward one.   

System Requirements Deep Dive

Before proceeding, it is essential to confirm that the host machine meets the official system requirements for Docker Desktop on Windows 11. The latest requirements are as follows :   

  • Operating System: A 64-bit version of Windows 11 is required. This can be the Home, Pro, Enterprise, or Education edition. It is highly recommended to be on version 22H2 or higher for the best compatibility and performance.
  • Processor: The system must have a 64-bit processor with Second Level Address Translation (SLAT). Nearly all modern CPUs manufactured in the last decade include this feature.
  • RAM: A minimum of 4GB of system RAM is required. However, for a smooth and responsive experience, 8GB of RAM or more is strongly recommended. Both Docker Desktop and the containers it runs will consume memory, and 4GB can become a significant bottleneck during development.   

The Most Critical Step: Enabling Hardware Virtualization

Docker on Windows does not run applications natively; it relies on hardware virtualization to run a lightweight Linux kernel through WSL 2. If this feature is disabled in the system’s BIOS/UEFI, Docker Desktop cannot function.   

How to Check if Virtualization is Enabled

A quick check can be performed without rebooting the system:

  1. Press Ctrl + Shift + Esc to open the Windows Task Manager.
  2. Navigate to the Performance tab.
  3. Select CPU from the left-hand panel.
  4. On the right side, look for the Virtualization status. If it reads Enabled, no further action is needed for this step. If it reads Disabled, it must be enabled in the BIOS/UEFI settings before proceeding.   

How to Enable Virtualization in BIOS/UEFI

Enabling virtualization requires rebooting the computer and entering its firmware settings. The exact steps can vary between computer manufacturers, but the general process is consistent.

The modern method for accessing UEFI firmware settings on Windows 11 is as follows :   

  1. Open the Settings app, navigate to System, and then select Recovery.
  2. Under the “Advanced startup” section, click the Restart now button.
  3. The computer will reboot into the Windows Recovery Environment. From here, select Troubleshoot > Advanced options > UEFI Firmware Settings and click Restart.

Alternatively, the traditional method involves pressing a specific key during the initial boot-up sequence. The correct key depends on the manufacturer.   

Once inside the BIOS/UEFI menu, the virtualization setting is typically located under an “Advanced,” “CPU Configuration,” or “Security” tab. The option will be labeled as Intel Virtualization Technology (VT-x)AMD-V, or SVM Mode. This setting must be changed to   

Enabled. After enabling it, it is crucial to save the changes and exit the BIOS/UEFI, which will cause the computer to reboot.

To assist in this process, the following table lists common BIOS/UEFI access keys for major PC manufacturers.

ManufacturerCommon Keys
DellF2, F12
HPEsc, F10
LenovoF1, F2, Fn+F2
ASUSF2, Del
MSI / GigabyteDel
Table 1: Common BIOS/UEFI access keys by manufacturer, compiled from user guides and support documentation.   

The Foundation: Installing the Windows Subsystem for Linux (WSL 2)

With the prerequisites confirmed, the next step is to install the foundation upon which Docker will run: the Windows Subsystem for Linux, version 2 (WSL 2). Docker Desktop uses WSL 2 as its backend to run Linux containers directly on Windows, offering near-native performance, faster startup times, and superior file system integration compared to the older Hyper-V backend.   

The One-Command Install

Microsoft has streamlined the WSL 2 installation into a single, powerful command.

  1. Open Windows PowerShell or Command Prompt with elevated permissions by right-clicking its icon in the Start Menu and selecting Run as administrator.
  2. Execute the following command :   Code snippetwsl --install

This one command automates several steps that previously had to be done manually. It enables the necessary “Virtual Machine Platform” and “Windows Subsystem for Linux” features, downloads the latest Linux kernel from Microsoft, sets WSL 2 as the default version, and installs the Ubuntu distribution of Linux by default.   

Post-Installation Reboot and Setup

After the command completes, a system reboot is required to finalize the installation of the new Windows features.Upon restarting, a console window for Ubuntu will automatically open to complete its initial setup. This process involves creating a new UNIX username and password. It is important to note that these credentials are for the Linux environment and are entirely separate from the standard Windows login credentials.   

The Main Event: Installing Docker Desktop

With WSL 2 in place, the system is now ready for the main installation of Docker Desktop.

Downloading the Correct Installer

The official installer should be downloaded directly from the Docker website to ensure its authenticity and to get the latest version.   

A critical and often overlooked detail is the system architecture. The installer for standard Intel and AMD processors is the x86_64 (or AMD64) version. Community forums are filled with reports from users who encountered an immediate “This app can’t run on your PC” error because they accidentally downloaded the ARM64 installer, which is intended for devices like the Surface Pro X. The download page’s user interface can sometimes be confusing, so it is vital to double-check that the correct version is being downloaded.   

The Installation Process

  1. Locate the downloaded Docker Desktop Installer.exe file.
  2. Double-click the installer to run it. It will prompt for administrator privileges, which are required for installation.  
  3. The main configuration screen presents a crucial choice. Ensure that the “Use WSL 2 instead of Hyper-V”option is checked. This configures Docker to use the modern, recommended backend for optimal performance.The option to add a desktop shortcut is a matter of user preference.   

Post-Installation Permissions (The docker-users Group)

While administrator rights are necessary for the installation, they are not required for everyday use of Docker. However, for a standard (non-administrator) user account to communicate with the Docker daemon, it must be added to the local docker-users security group, which is created during installation.   

To add a user to this group:

  1. Open the Computer Management utility. This can be found by searching for it in the Start Menu. It must be run as an administrator.
  2. In the left-hand pane, navigate to Local Users and Groups > Groups.
  3. Locate and right-click the docker-users group, then select Add to Group….
  4. Click the Add… button, type the name of the user account to be granted Docker access, and click OK.
  5. After adding the user, it is essential to sign out of Windows and sign back in. This step is mandatory for the new group membership to take effect; a simple reboot is not always sufficient.   

Liftoff! Verification and Your First Real-World Container

With the setup and configuration complete, it is time to verify the installation and launch a container. This section confirms that all components are working together correctly and provides a tangible result.

The Command-Line Handshake

Open a new PowerShell or Command Prompt terminal. If the user account was added to the docker-users group, this terminal should not be run as an administrator, in order to test that the permissions are working correctly.

First, verify that the Docker CLI can communicate with the Docker daemon by checking the version:

Code snippet

docker --version

This should return the installed Docker version, for example, Docker version 25.0.3, build 4debf41.

Next, run the command to list active containers:

Code snippet

docker ps

Since no containers are running yet, this command should return an empty table with just the column headers (CONTAINER ID, IMAGE, etc.). This successful, empty response confirms that the CLI is properly connected to the Docker Engine.   

The “Hello World” Ritual

The traditional first step in the Docker world is to run the hello-world image. This serves as a definitive test of the entire system.

Code snippet

docker run hello-world

This command performs several actions: it checks for the hello-world image locally, downloads it from the Docker Hub image repository if it’s not found, creates a new container from that image, runs the container, and prints a confirmation message to the terminal before exiting. A successful run will display a message beginning with “Hello from Docker!”   

Practical Application: Launching an Nginx Web Server

While hello-world confirms the system works, it doesn’t demonstrate practical usage. A far more engaging and instructive first step is to launch a live web server. This introduces core concepts like port mapping and detached mode, providing an interactive result that solidifies understanding. This approach bridges the gap from a simple installation check to genuine, practical application.   

To launch an Nginx web server container, execute the following command:

Code snippet

docker run -d -p 8080:80 --name my-web-server nginx

Each part of this command has a specific function:

  • docker run: The primary command to create and start a new container.
  • -d or --detach: Runs the container in the background, freeing up the terminal for other commands.
  • -p 8080:80 or --publish 8080:80: Maps port 8080 on the host machine (the PC) to port 80 inside the container. Nginx listens on port 80 by default, so this makes it accessible from the host’s browser.
  • --name my-web-server: Assigns a human-readable name to the container for easier management.
  • nginx: Specifies the official Nginx image to be used, which Docker will pull from Docker Hub.

To verify that the web server is running, open a web browser and navigate to the address http://localhost:8080. The “Welcome to nginx!” page should be displayed, confirming the container is running and accessible.

For an even more powerful demonstration, the default page can be customized using a bind mount. This links a directory on the host machine directly into the container’s filesystem.

  1. First, stop and remove the existing container: docker stop my-web-server followed by docker rm my-web-server.
  2. Create a new folder on the Desktop named my-site.
  3. Inside this folder, create a new text file named index.html.
  4. Open index.html and add the following content: <h1>Hello from my first Docker container!</h1>.
  5. Now, run a new container with a volume (-v) flag to mount the local directory. The path must be an absolute path.Code snippetdocker run -d -p 8080:80 --name my-web-server -v C:\Users\YourUsername\Desktop\my-site:/usr/share/nginx/html nginx (Replace YourUsername with the actual Windows username).
  6. Refresh the browser at http://localhost:8080. It will now display the custom “Hello from my first Docker container!” message. This demonstrates the power of bind mounts for live development.   

Your Essential Docker Command Toolkit

Now that a container is running, a few essential commands are needed to manage it. This section serves as a quick-reference cheat sheet for the most common day-to-day Docker operations, empowering users to immediately interact with and control their new containerized environment.   

CommandDescriptionExample Usage
docker psLists all currently running containers.docker ps
docker ps -aLists all containers, including those that are stopped.docker ps -a
docker stop <name_or_id>Stops a running container gracefully.docker stop my-web-server
docker start <name_or_id>Starts a previously stopped container.docker start my-web-server
docker rm <name_or_id>Removes a stopped container permanently.docker rm my-web-server
docker imagesLists all Docker images stored locally on the machine.docker images
docker rmi <image_name>Removes a local image (only if no containers are using it).docker rmi nginx
docker logs <name_or_id>Fetches the standard output logs from a container.docker logs my-web-server
docker logs -f <name_or_id>Follows the log output in real-time, streaming new logs.docker logs -f my-web-server
docker exec -it <name> <cmd>Executes a command inside a running container (e.g., opens a shell).docker exec -it my-web-server bash
Table 2: A list of essential Docker commands for beginners.   

Troubleshooting: Your Guide to Common Installation & Runtime Errors

Even with careful preparation, issues can arise. This section serves as a first-aid kit, addressing the most common installation and runtime errors. These questions are framed to match the exact error messages users are likely to search for, making this guide a valuable resource during troubleshooting.

FAQ 1: Why am I getting an “Unexpected WSL error”?

  • Symptoms: Docker Desktop fails to start and displays a popup with this error, often mentioning access rights issues or suggesting a wsl --shutdown command.   
  • Solutions: These steps should be attempted in order.
    1. Simple Reset: Open PowerShell and run wsl --shutdown. This command completely stops the WSL 2 virtual machine. Wait a few seconds and then try to restart Docker Desktop. This often resolves transient state issues.   
    2. Network Stack Reset: If the issue persists, it may be due to corruption in the Windows networking stack that facilitates communication with WSL. Open PowerShell as an administrator and run netsh winsock reset. A system reboot is required after this command.   
    3. Check Hypervisor Launch Type: Ensure the Windows hypervisor is configured to start automatically. Open an administrator PowerShell and run bcdedit /set hypervisorlaunchtype Auto, then reboot.   
    4. Full Re-enable Cycle: As a last resort, the virtualization components can be fully reinstalled. In an administrator PowerShell, run the following commands to disable the features: DISM /Online /disable-Feature /FeatureName:VirtualMachinePlatform DISM /Online /disable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux Reboot the computer. Then, open another administrator PowerShell and re-enable them: DISM /Online /enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux DISM /Online /enable-Feature /FeatureName:VirtualMachinePlatform Reboot one final time.   

FAQ 2: Docker Desktop won’t start after I close it or restart my PC. What’s wrong?

  • Symptoms: The application ran perfectly after the initial installation but now fails to launch. The Docker icon might appear in the system tray and then disappear, or nothing happens at all.
  • Solution: This issue is frequently caused by lingering background processes that did not terminate correctly.
    1. Open Task Manager (Ctrl + Shift + Esc).
    2. Go to the Details tab.
    3. Sort by name and look for any processes named Docker Desktop.exe or involving the Docker backend.
    4. Select each of these processes and click End task.
    5. Once all related processes are terminated, try launching Docker Desktop again.   

FAQ 3: The installer says “This app can’t run on your PC.” How do I fix it?

  • Symptoms: The Docker Desktop Installer.exe fails immediately upon execution with this generic Windows error message.
  • Solution:
    1. Primary Cause: The most common reason for this error is an architecture mismatch. The user has likely downloaded the ARM64 installer for a standard PC with an Intel or AMD processor. Return to the official Docker website and ensure the x86_64 / AMD64 version is downloaded.   
    2. Secondary Cause: If the correct installer was used, this error indicates that a core system prerequisite is not met. Return to Section 1 of this guide and verify that hardware virtualization is enabled in the BIOS/UEFI.

FAQ 4: My installation failed with an error about virtualization or WSL.

  • Symptoms: The installer shows an error message such as “WSL 2 installation is incomplete,” “Docker Desktop requires a WSL 2 backend,” or another message explicitly mentioning virtualization.
  • Solution: This is a clear indicator that a prerequisite was missed or is not configured correctly.
    1. Reboot and enter the BIOS/UEFI to confirm that Intel VT-x or AMD-V is Enabled. This is the most common point of failure.
    2. Ensure the “Virtual Machine Platform” Windows feature is turned on. To be certain, run dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart in an administrator PowerShell and reboot.   

FAQ 5: I’m getting “permission denied” or “daemon is not running” errors when I run dockercommands.

  • Symptoms: In a non-administrator terminal, commands like docker ps fail with an error indicating that the client cannot connect to the Docker daemon.
  • Solution: This is a classic permissions problem.
    1. Confirm that the current user account is a member of the docker-users local group, as detailed in Section 3.
    2. Crucially, the user must sign out of Windows and sign back in for the change in group membership to be applied to their security token. Simply rebooting or closing and reopening the terminal is not sufficient.

Conclusion: Your Docker Journey Begins Now

By following this guide, a user has successfully prepared their Windows 11 system, installed the necessary prerequisites like WSL 2, installed and configured Docker Desktop, verified the complete installation, and launched a real-world Nginx container. This accomplishment provides a powerful and stable foundation for modern software development.

With a functional Docker environment, the journey into containerization truly begins. The next logical steps to expand on this foundation include:

  • Learning Docker Compose: For applications that consist of multiple services (such as a web application, a database, and a caching layer), Docker Compose is the standard tool. It allows for the definition and management of a complete multi-container application stack using a single YAML configuration file, simplifying complex deployments into one command.   
  • Writing a Dockerfile: The true power of Docker is realized when packaging custom applications. The next step is to learn how to write a Dockerfile, which is a text file containing step-by-step instructions for building a custom Docker image from an application’s source code.   
  • Exploring Docker Hub: Docker Hub is a vast public registry containing thousands of pre-built images for various applications and services. It is an invaluable resource for finding official images and is also the platform for sharing custom-built images with the community or a private team.   
Graham Miranda
Graham Mirandahttp://grahammiranda.com/
Welcome! I’m Graham Miranda—a lifelong tinkerer, intrepid traveler, and devoted music buff. Technology has always been more than a hobby; it’s the lens through which I explore the world. From dissecting the inner workings of innovative devices to uncovering hidden features in everyday apps, my mission is to equip you with insights that empower smarter choices and ignite curiosity. My journey began with building DIY gadgets in my bedroom and grew into a tech blog where I share hands-on reviews, easy-to-follow tutorials, and practical how-tos. Along the way, I’ve trekked through bustling markets in Bangkok, stargazed in the Atacama Desert, and captured sunrise panoramas atop European peaks—all of which inform my writing and fuel my passion for discovery.

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

en_USEnglish