This error occurs when Docker Desktop fails to communicate with the Windows Subsystem for Linux (WSL 2) backend. It typically appears on Windows 10/11 when WSL components are misconfigured, outdated, or conflicting with other software like VPNs or Hyper-V settings.
Docker Desktop on Windows uses WSL 2 (Windows Subsystem for Linux) as its default backend for running Linux containers. When Docker starts, it creates two WSL distributions: 'docker-desktop' and 'docker-desktop-data'. The 'Unexpected WSL error' message indicates that Docker cannot properly initialize or communicate with these WSL distributions. This can happen for several reasons: the required Windows features (Virtual Machine Platform, WSL) might not be enabled, the Hyper-V hypervisor might be disabled, the WSL kernel might be outdated, or there could be conflicts with VPN software or other virtualization tools. In some cases, the Docker WSL distributions themselves become corrupted and need to be re-registered.
Start with the simplest fix. Open PowerShell or Command Prompt as Administrator and run:
wsl --shutdownWait a few seconds, then restart Docker Desktop. This terminates all WSL instances and often resolves temporary issues.
An outdated WSL kernel is a common cause. Run these commands as Administrator:
wsl --updateIf that fails, download the manual installer from https://aka.ms/wsl2kernel and run the wsl_update_x64.msi file.
Docker Desktop requires Virtual Machine Platform and WSL. Open PowerShell as Administrator:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartRestart your computer after enabling these features.
Check if the hypervisor is enabled:
bcdedit /enum | findstr -i hypervisorlaunchtypeIf you see hypervisorlaunchtype Off, enable it with:
bcdedit /set hypervisorlaunchtype AutoRestart your computer for changes to take effect.
VPN software, especially NordVPN, can interfere with WSL networking. Try:
1. Disconnect from VPN (keep the app running, just disconnect)
2. Restart Docker Desktop
3. If Docker works, you may need to configure split tunneling or disable VPN while using Docker
Network configuration issues can prevent WSL from working. Run as Administrator:
netsh winsock resetRestart your computer after running this command.
If the Docker WSL distributions are corrupted, remove them so Docker can recreate them:
wsl --unregister docker-desktop
wsl --unregister docker-desktop-dataWarning: This will delete all Docker containers and images. Back up important data first using docker save and docker export.
After unregistering, restart Docker Desktop. It will recreate the distributions automatically.
A corrupted settings file can prevent Docker from starting. Close Docker Desktop completely, then delete:
%AppData%\Docker\settings.jsonDocker will recreate this file with default settings on next start. Your containers and images are preserved.
If nothing else works:
1. Uninstall Docker Desktop from Windows Settings > Apps
2. Run wsl --unregister docker-desktop and wsl --unregister docker-desktop-data
3. Restart your computer
4. Download the latest Docker Desktop from https://www.docker.com/products/docker-desktop
5. Install using the default settings (do not use custom install location)
VM Time Sync Issues: If Docker containers show incorrect time, run sudo hwclock -s inside WSL to sync the VM clock with the host.
Azure/AWS VMs: If running Docker Desktop in a cloud VM, you need nested virtualization support. This is only available on specific VM sizes (Dv3, Ev3 series on Azure) and regions.
Windows Insider/Preview builds: Newer Windows builds may break WSL compatibility temporarily. Check Docker's GitHub issues for known compatibility problems.
Alternative: If WSL 2 continues to cause issues, you can switch Docker Desktop to use the Hyper-V backend instead. Edit %AppData%\Docker\settings.json and set wslEngineEnabled to false. Note that Hyper-V backend has different performance characteristics and requires Hyper-V feature enabled.
image operating system "linux" cannot be used on this platform
How to fix 'image operating system linux cannot be used on this platform' in Docker
manifest unknown: manifest unknown
How to fix 'manifest unknown' in Docker
cannot open '/etc/passwd': Permission denied
How to fix 'cannot open: Permission denied' in Docker
Error response from daemon: failed to create the ipvlan port
How to fix 'failed to create the ipvlan port' in Docker
toomanyrequests: Rate exceeded for anonymous users
How to fix 'Rate exceeded for anonymous users' in Docker Hub