Cloud Native 10 min read

Step‑by‑Step Guide to Downloading and Configuring Docker Desktop on Windows

This tutorial walks you through downloading Docker Desktop, enabling required Windows features like Hyper‑V and Containers, applying Chinese localization, configuring firewall and hosts settings, and troubleshooting common errors with detailed PowerShell commands and configuration files.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Step‑by‑Step Guide to Downloading and Configuring Docker Desktop on Windows

Enable Windows Features

Docker Desktop requires Hyper‑V (or Windows Containers). Two ways are provided: a script or the Windows UI.

Script method

Create enable_hyper_v.cmd with the following content and run it as administrator:

pushd "%~dp0"
DIR /b %SystemRoot%\servicing\Packages\*Hyper‑v*.mum >hyper‑v.txt
for /f %%i in ('findstr /i . hyper‑v.txt 2^>nul') do dism /online /norestart /add‑package:"%SystemRoot%\servicing\Packages\%%i"
DEL hyper‑v.txt
Dism /online /enable‑feature /featurename:Microsoft‑Hyper‑V‑All /LimitAccess /ALL

Run the script by right‑clicking it and selecting Run as administrator . This enables Hyper‑V and all related components.

Manual UI method

Open Control Panel → Programs → Turn Windows features on or off , check Hyper‑V (including all sub‑items), click OK, and reboot if prompted.

Download and Prepare Docker Desktop

Download Docker Desktop from the official site (https://www.docker.com/products/docker-desktop/) or from the provided Baidu Netdisk link (password 73q3). Extract the DockerDesktop‑CN‑master.zip archive. Inside, locate the version‑specific folder and copy the Chinese resource files to the Docker installation directory (e.g., C:\Program Files\Docker\Docker) before Docker is running.

Docker Desktop Chinese files
Docker Desktop Chinese files

Software Localization

Copy the Chinese resource files into the Docker installation directory and ensure they match the installed version. Do not modify Docker while it is running.

Start Docker and Configure Settings

Launch Docker Desktop, open Settings , and perform the following actions:

Allow Docker through the Windows firewall.

Disable security software that may block Docker (e.g., 360, 火绒).

Ensure no other process locks the hosts file.

Docker Settings
Docker Settings

PowerShell Commands for Final Setup

# Shut down any existing WSL instances
wsl --shutdown

# Start Docker Desktop
Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"

# Start Docker service
net start com.docker.service

# Update WSL to the latest version
wsl --update

# Set WSL 2 as the default version
wsl --set-default-version 2

# Enable Hyper‑V (if not already enabled)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

Common Issues and Fixes

Windows Containers Not Enabled

Create containers.bat with the following content and run it as administrator:

pushd "%~dp0"
DIR /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt
for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add‑package:"%SystemRoot%\servicing\Packages\%%i"
DEL containers.txt
Dism /online /enable‑feature /featurename:Containers -All /LimitAccess /ALL
pause

Hosts File Permission Errors

Docker may fail with an error like Access to C:\WINDOWS\System32\drivers\etc\hosts denied. Resolve by:

Run Docker Desktop with Run as administrator .

Give your user full control over the hosts file (Properties → Security → Edit → Full Control).

Close any program that might lock the file (text editors, antivirus, VPN, etc.). Use Process Explorer to search for hosts and terminate the locking process.

Remove the read‑only attribute from hosts (right‑click → Properties → uncheck Read‑only).

Additional Troubleshooting Steps

Ensure no firewall rule blocks Docker’s network traffic.

Verify that WSL 2 is correctly installed and set as default.

Restart Docker Desktop after any configuration change.

Backup Important Configuration Files

Keep copies of the following files for future reference or re‑installation:

settings-store.json – located at

C:\Users\<em>username</em>\AppData\Roaming\Docker
{
  "AutoPauseTimeoutSeconds": 600,
  "AutoStart": true,
  "DesktopTerminalEnabled": true,
  "DisplayedOnboarding": true,
  "EnableDockerAI": false,
  "IntegratedWslDistros": ["Ubuntu-24.04"],
  "LicenseTermsVersion": 2,
  "SettingsVersion": 41,
  "UseContainerdSnapshotter": true
}

hosts – located at C:\Windows\System32\drivers\etc\hosts. Docker adds entries such as:

# Added by Docker Desktop
127.0.0.1 host.docker.internal
127.0.0.1 gateway.docker.internal
127.0.0.1 kubernetes.docker.internal
# GitHub mirrors
185.199.108.133 raw.githubusercontent.com
140.82.113.4 github.com

daemon.json – located at C:\ProgramData\Docker\config. Example content:

{
  "builder": {"gc": {"defaultKeepStorage": "20GB", "enabled": true}},
  "dns": ["8.8.8.8", "114.114.114.114"],
  "experimental": true,
  "features": {"buildkit": true, "ipv6": false},
  "registry-mirrors": [
    "https://docker.mirrors.ustc.edu.cn",
    "http://hub-mirror.c.163.com",
    "https://registry.docker-cn.com",
    "https://mirror.ccs.tencentyun.com"
  ]
}

When reinstalling Docker Desktop, compare these files with the defaults to restore your custom settings (localization, DNS mirrors, storage limits, etc.).

Final Tips

Before troubleshooting future Docker issues, verify that Windows updates, security software, or port conflicts are not the cause. Use Win + I to open Settings and check the status of Hyper‑V, the WSL version, and firewall rules.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ConfigurationtroubleshootingHyper-VWSL2
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.