Skip to content

Install Docker on Windows

This chapter covers how to install and configure Docker on Windows.

System Requirements

Docker Desktop Requirements

  • Windows 10 64-bit: Pro, Enterprise, or Education (Build 19041+)
  • Windows 11 64-bit: Home, Pro, Enterprise, or Education
  • WSL 2 or Hyper-V enabled
  • At least 4GB RAM
  • Hardware virtualization enabled in BIOS

Docker Desktop recommends WSL 2 for better performance:

1. Enable WSL

powershell
# Run PowerShell as Administrator
wsl --install

2. Manual Setup (if above command unavailable)

powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart-Computer

After restart:

powershell
wsl --set-default-version 2

Install Docker Desktop

1. Download

Visit Docker Desktop and download the Windows installer.

2. Run Installer

Double-click Docker Desktop Installer.exe and follow the wizard:

  • Check "Use WSL 2 instead of Hyper-V" (recommended)
  • Check "Add shortcut to desktop" (optional)

3. Launch Docker Desktop

Start Docker Desktop from the Start menu. Wait for initialization to complete on first launch.

4. Verify Installation

powershell
docker --version
docker run hello-world

Docker Desktop Settings

Resource Configuration

In "Settings" → "Resources" → "WSL Integration":

  • Enable integration with installed WSL distributions
  • Adjust CPU and memory allocation (Hyper-V backend)

Docker Engine Configuration

In "Settings" → "Docker Engine", edit daemon.json:

json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

Hyper-V Backend (Alternative)

powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
Restart-Computer

Common Issues

WSL 2 Installation Fails

powershell
wsl --update
wsl -l -v

Hyper-V and VirtualBox Conflict

  • Use WSL 2 backend instead of Hyper-V
  • Or disable Hyper-V when not needed: bcdedit /set hypervisorlaunchtype off

Docker Desktop Starts Slowly

  • Ensure virtualization is enabled in BIOS (Intel VT-x / AMD-V)
  • Increase Docker memory allocation
  • Close unnecessary background programs

Windows Containers (Optional)

Docker Desktop supports switching between Windows and Linux containers:

  • Right-click Docker icon in system tray
  • Select "Switch to Windows containers" or "Switch to Linux containers"

💡 Use Linux containers for most cases. Windows containers are mainly for .NET Framework applications.

Further Reading

Content is for learning and research only.