How to Install Docker on Windows: A Step-by-Step Guide (WSL2)
If you write code on a Windows machine and you want to build, run, and ship containers, the path is clearer than most tutorials make it sound. You install Docker Desktop, you enable the WSL2 backend, and you confirm virtualization is on. That is genuinely most of the work. The rest of this guide walks through each step precisely, explains *why* each piece exists, and shows you how to fix the handful of issues that trip people up.
I have set up Docker on dozens of Windows workstations and onboarded engineers who had never touched a container. The same questions come up every time, so I have folded the answers directly into the steps below.
Key Takeaways
• To install Docker on Windows you need 64-bit Windows 10/11, the WSL2 backend (or Hyper-V), and hardware virtualization enabled in BIOS/UEFI.
• Docker Desktop is the correct product for Windows development; the native Docker Engine is Linux-only.
• Enable WSL2 with a single command: `wsl –install`, then run the Docker Desktop installer and restart.
• Verify your install with `docker –version` and `docker run hello-world`.
• What you build locally on Windows runs identically on a Linux production server, because Docker on Windows is Linux under the hood.
What do you need before you install Docker on Windows?
Before downloading anything, confirm your machine meets the requirements. Skipping this is the single most common reason a Docker Desktop install fails or refuses to start.
You need a 64-bit version of Windows 10 or Windows 11. On Windows 10, keep the OS reasonably up to date, because the WSL2 backend depends on recent components. You also need a backend for running Linux containers — either WSL2 (recommended) or Hyper-V. Finally, and this is the part people forget, hardware virtualization must be enabled in your BIOS/UEFI. Without it, neither WSL2 nor Hyper-V can start a virtual machine, and Docker Desktop will not launch.
Here is a quick checklist you can run through in a couple of minutes.
| Requirement | How to check |
|---|---|
| 64-bit Windows 10/11 | Settings → System → About → look at “System type” |
| Virtualization enabled | Task Manager → Performance → CPU → “Virtualization: Enabled” |
| WSL2 available | Run `wsl –status` in PowerShell |
| Enough RAM (8 GB+ recommended) | Settings → System → About → “Installed RAM” |
| Admin rights | You need an administrator account to install |
If Task Manager reports virtualization as disabled, reboot into your BIOS/UEFI (usually by pressing Del, F2, or F10 at startup) and enable the setting. It is labelled differently across manufacturers: Intel VT-x, AMD-V, SVM Mode, or simply Virtualization Technology. Save, exit, and check Task Manager again.
Why does Docker Desktop use the WSL2 backend?
Docker Desktop on Windows can run on two backends: the older Hyper-V backend and the modern WSL2 backend. WSL2 (Windows Subsystem for Linux, version 2) ships a real, lightweight Linux kernel that integrates tightly with Windows. Docker Desktop uses it to run the Docker daemon and your containers.
The WSL2 backend is faster, uses less memory, starts more quickly, and shares resources more gracefully with the rest of your system than the old Hyper-V approach. For new installs on Windows 10/11, WSL2 is the default and the right choice. Hyper-V remains as a fallback, primarily for environments where WSL2 is unavailable or restricted by policy.
Here is the thing most Windows tutorials never tell you, and it clears up nearly every confusing Docker-on-Windows issue at once: Docker on Windows is really Docker running inside a lightweight Linux environment. Containers are a Linux kernel technology — they use Linux namespaces and cgroups, which simply do not exist on the Windows kernel. So Docker Desktop quietly spins up a Linux VM (that is what WSL2 provides) and runs your containers *there*, presenting a seamless Windows experience on top. Once you internalize this, three things suddenly make sense: why WSL2 or virtualization must be enabled (you literally need a Linux VM), why Linux containers are the default (that is the only kernel that can run them), and why an image you build on Windows runs identically on a Linux production server — because it was Linux all along. You are not “running Docker on Windows” so much as you are running Docker *on Linux, conveniently from Windows*.
How do you enable WSL2 on Windows?
On current versions of Windows 10 and 11, enabling WSL2 takes one command. Open PowerShell as Administrator (right-click the Start button → “Terminal (Admin)” or “Windows PowerShell (Admin)”) and run:
“`powershell wsl –install “`
This single command does a lot of work for you: it enables the required Windows features (the Virtual Machine Platform and the WSL feature), downloads the latest Linux kernel, sets WSL2 as the default version, and installs a default Linux distribution (Ubuntu, unless you specify otherwise). When it finishes, restart your computer to let the new Windows features load.
After rebooting, confirm WSL2 is set up correctly:
“`powershell wsl –status wsl –list –verbose “`
You want to see WSL version 2 reported. If you are on an older Windows build where `wsl –install` is not available, update Windows first, or follow Microsoft’s manual steps to enable the “Virtual Machine Platform” feature and install the kernel update package. In practice, updating Windows and re-running `wsl –install` is the cleanest route.
If you want to understand the broader picture of how containers relate to the virtual machines underneath them, see .
How do you install Docker Desktop on Windows step by step?
With WSL2 enabled and virtualization confirmed, installing Docker Desktop is straightforward.
Step 1 — Download the installer. Go to the official Docker website and download Docker Desktop for Windows. You will get an executable named `Docker Desktop Installer.exe`. Always download from Docker’s official site to avoid tampered builds.
Step 2 — Run the installer. Double-click the installer. When prompted for configuration, make sure “Use WSL 2 instead of Hyper-V” is checked. This is the recommended backend and is selected by default on supported systems. Accept the defaults for the rest unless you have a specific reason not to.
Step 3 — Complete installation and restart. Let the installer finish copying files, then restart Windows when asked. Docker Desktop integrates with WSL2 and the system tray, and a clean restart avoids half-initialized states.
Step 4 — Launch Docker Desktop. After the reboot, start Docker Desktop from the Start menu. The first launch takes a little longer because it initializes the WSL2 integration and starts the Docker daemon. Wait until the whale icon in the system tray stops animating and the dashboard reports that Docker is running. Accept the service agreement on first run.
If this is your first time working with containers and you want the conceptual grounding, it helps to read alongside this setup guide.
How do you verify Docker is installed correctly?
Once Docker Desktop reports that it is running, verify the installation from a terminal. Open PowerShell (a regular window is fine now — no admin needed) and check the version:
“`powershell docker –version docker info “`
`docker –version` prints the installed Docker version. `docker info` is a deeper check — it confirms the CLI can actually talk to the daemon and shows your server details. If `docker info` returns server information without errors, your CLI and daemon are wired up correctly.
Now run the canonical smoke test:
“`powershell docker run hello-world “`
Docker will pull the tiny `hello-world` image from Docker Hub (if it is not already cached) and run it as a container. You should see a message that begins with “Hello from Docker!” and explains the steps Docker just performed. If you see that message, your installation is fully working: the CLI talked to the daemon, the daemon pulled an image, created a container, and ran it.
What is the difference between Docker Desktop and Docker Engine?
This trips up a lot of newcomers, so let me be precise.
Docker Engine is the core open-source runtime — the daemon (`dockerd`), the CLI, and the underlying container runtime. It runs natively on Linux. There is no native Docker Engine for the Windows kernel that runs Linux containers, because, as covered above, Linux containers need a Linux kernel.
Docker Desktop is an application that packages Docker Engine *plus* everything needed to run it well on Windows (and macOS): the WSL2 (or Hyper-V) backend that supplies the Linux kernel, a graphical dashboard, automatic updates, Kubernetes support, and tooling integration. On Windows, Docker Desktop is the right choice for development. It gives you the full Docker experience without manually managing a Linux VM.
| Aspect | Docker Desktop (Windows) | Docker Engine (native) |
|---|---|---|
| Platform | Windows, macOS | Linux |
| Runs Linux containers via | Bundled WSL2/Hyper-V VM | Host Linux kernel directly |
| GUI dashboard | Yes | No (CLI only) |
| Best for | Local development on Windows/Mac | Production Linux servers |
The practical takeaway: develop with Docker Desktop on Windows, and deploy to Docker Engine on a Linux server in production.
How do you fix common Docker installation issues on Windows?
Most failures fall into three buckets, and all three are quick to resolve.
Virtualization not enabled. If Docker Desktop refuses to start, or Task Manager shows “Virtualization: Disabled,” the fix is in your BIOS/UEFI. Reboot into firmware settings and enable Intel VT-x / AMD-V (sometimes labelled SVM or Virtualization Technology). This is by far the most frequent cause of a broken install.
WSL2 not installed or out of date. If Docker Desktop reports that WSL2 is missing or the kernel is outdated, run these in an admin PowerShell:
“`powershell wsl –install wsl –update wsl –set-default-version 2 “`
Then restart. `wsl –update` specifically refreshes the Linux kernel component, which resolves a common “WSL 2 installation is incomplete” error.
Hyper-V conflicts. Some virtualization tools and certain Windows features can clash with the backend Docker needs. If you are on the WSL2 backend, you generally avoid the old Hyper-V conflicts entirely — which is one more reason to prefer it. If you must use Hyper-V, ensure the “Hyper-V” and “Virtual Machine Platform” Windows features are enabled together, and that no third-party hypervisor is holding the virtualization extensions hostage.
A general rule: after any of these fixes, restart Windows before testing again. WSL and virtualization changes only take full effect after a reboot.
How do you run your first container?
You already ran `hello-world` as a smoke test. Now run something you can actually interact with. This command starts an Nginx web server in a container and maps it to port 8080 on your machine:
“`powershell docker run -d -p 8080:80 –name my-web nginx “`
Open a browser and visit `http://localhost:8080` — you will see the Nginx welcome page, served from a container running inside your WSL2 Linux environment. To see it in your container list and then stop and remove it:
“`powershell docker ps docker stop my-web docker rm my-web “`
That is the whole lifecycle: pull an image, run a container, expose a port, stop it, remove it. From here, learning how images are built and layered is the natural next step — see .
Develop on Windows, ship to a Linux home with DarazHost. Docker Desktop is built for local development, but containers belong in production on Linux. DarazHost is where your Windows-built containers go to production: develop locally with Docker Desktop, then deploy the very same images to a DarazHost Linux SSD VPS or dedicated server with full root access, guaranteed resources, and transparent pricing. Because Docker on Windows was Linux all along, the images you prototype on your laptop run identically on a DarazHost server — the natural Linux home for the containers you build on Windows, backed by 24/7 support.
Where does Docker Desktop fit in your workflow?
Docker Desktop is a local development tool. Its job is to give you a fast, convenient way to build and test containers on your own machine before they go anywhere else. It is excellent at exactly that.
Production is a different story. In production, your containers run on a Linux server — directly on Docker Engine, or orchestrated by a system like Kubernetes — where there is no GUI, no laptop sleeping at night, and resources are dedicated to running your workloads reliably. The beautiful part, and the through-line of this entire guide, is that the gap between the two is small: because Docker Desktop runs your containers on Linux under the hood, the image you validate on Windows is the same image that runs in production. You build once and run anywhere.
For the bigger picture of how containers fit into scalable, cloud-based infrastructure, read our pillar guide: Cloud Hosting and Containers: The Strategic Guide to Scalable Infrastructure. And when you are ready to move from a Windows laptop to a real Linux host, the workflow is identical to what you would follow in .
Frequently asked questions
Do I need to enable WSL2 to use Docker on Windows? For the recommended setup, yes. Docker Desktop uses the WSL2 backend to provide the Linux kernel that containers require. You can fall back to the Hyper-V backend on supported editions, but WSL2 is faster, lighter, and the default. Enable it with `wsl –install`.
Why does Docker Desktop need virtualization enabled in BIOS? Because Docker runs your containers inside a lightweight Linux virtual machine (via WSL2 or Hyper-V), and starting any VM requires hardware virtualization support — Intel VT-x or AMD-V. If virtualization is disabled in BIOS/UEFI, Docker Desktop cannot start its Linux backend and will fail to launch.
Is Docker Desktop free for Windows? Docker Desktop is free for personal use, education, open-source projects, and small businesses. Larger commercial organizations require a paid subscription. Check Docker’s current licensing terms before deploying it across a company.
Can I run Windows containers instead of Linux containers? Docker Desktop can switch to Windows container mode, which runs containers using the Windows kernel. However, the overwhelming majority of container images and tutorials target Linux, and Linux containers are the default. Unless you specifically need Windows containers, stay in Linux container mode.
Will containers I build on Windows run on a Linux server? Yes. Because Docker Desktop builds and runs Linux containers (inside its WSL2 Linux environment), the images you produce on Windows are standard Linux images. They run identically on a Linux VPS or dedicated server, which is exactly how a develop-locally, deploy-to-Linux workflow is supposed to work.