Install Docker Desktop machine-wide on Windows 11 Pro/Enterprise, enable the required Windows features, select the Windows container engine, and run a Nano Server smoke test.
This setup requires Administrator access and a restart. Windows containers are not available from Docker Desktop's per-user installation mode.
Sources:
- Docker Desktop installation modes and installer flags
- Docker Desktop permission requirements
- Microsoft: prepare Windows for containers
- Microsoft: run your first Windows container
Download install-windows-docker.ps1 from this gist, inspect it, and run it
from PowerShell as Administrator:
$url = 'https://gist.githubusercontent.com/YoraiLevi/04c1a97f368fb4f6630f9f741c6ac8e1/raw/install-windows-docker.ps1'
$dest = "$env:TEMP\install-windows-docker.ps1"
Invoke-WebRequest -UseBasicParsing $url -OutFile $dest
Unblock-File $dest
Get-Content $dest
& $destIf the script enables Hyper-V or Containers, it stops and asks you to restart. After restarting, run the script again. The second run installs Docker Desktop, starts its Windows engine, and performs this smoke test:
docker run --rm --isolation=hyperv `
mcr.microsoft.com/windows/nanoserver:ltsc2022 `
cmd.exe /S /C "echo Hello from a Windows container & ver"Use -SkipSmokeTest if you do not want to download the Nano Server image:
& $dest -SkipSmokeTest| Requirement | Why |
|---|---|
| Windows 11 Pro or Enterprise | Docker Desktop Windows-container support |
| Hardware virtualization enabled | Required by Hyper-V isolation |
| Administrator access | Required for Windows features and machine-wide installation |
| At least 8 GB RAM | Docker Desktop's documented minimum |
| WinGet | Used to download and track Docker Desktop |
Check virtualization in Task Manager → Performance → CPU. It should say
Virtualization: Enabled.
As checked on 2026-08-05, the public Docker.DockerDesktop WinGet manifest
adds these installer arguments:
--backend=wsl-2 --no-windows-containers
That produces a Linux-only Docker Desktop installation. The Windows engine is
absent and this command fails with engine is disabled:
docker desktop engine use windowsThe script uses WinGet's --override option to replace the manifest arguments:
winget install --exact --id Docker.DockerDesktop --source winget `
--override "install --quiet --accept-license --backend=windows --always-run-service"The important points are:
--backend=windowsselects the Windows engine initially.- Omitting
--no-windows-containerskeeps Windows integration available. --always-run-servicekeeps Docker's privileged Windows service available.- The default installation is machine-wide, which Windows containers require.
The manifest may change later. Inspect the current version in the WinGet community repository.
Open PowerShell as Administrator.
Enable Hyper-V and Containers:
Enable-WindowsOptionalFeature -Online `
-FeatureName Microsoft-Hyper-V-All -All -NoRestart
Enable-WindowsOptionalFeature -Online `
-FeatureName Containers -All -NoRestart
Set-Service LanmanServer -StartupType Automatic
Start-Service LanmanServer
Restart-ComputerAfter restarting, install Docker Desktop with corrected arguments:
winget install --exact --id Docker.DockerDesktop --source winget `
--accept-source-agreements --accept-package-agreements `
--override "install --quiet --accept-license --backend=windows --always-run-service"Start Docker and verify the engine:
docker desktop start
docker desktop engine ls
docker desktop engine use windows
docker info --format 'Docker server OS: {{.OSType}}'Expected result:
Docker server OS: windows
Run a disposable Windows container:
docker run --rm --isolation=hyperv `
mcr.microsoft.com/windows/nanoserver:ltsc2022 `
cmd.exe /S /C "echo Hello from a Windows container & ver"Check the installation policy:
Get-Content C:\ProgramData\DockerDesktop\install-settings.json
docker desktop engine lsIf it contains "noWindowsContainers": true, Docker was installed with an
installation-time security restriction. Do not work around it by manually
editing the JSON file.
Back up important Docker images and volumes before uninstalling. Uninstalling Docker Desktop removes its local Docker data.
winget uninstall --exact --id Docker.DockerDesktop
winget install --exact --id Docker.DockerDesktop --source winget `
--accept-source-agreements --accept-package-agreements `
--override "install --quiet --accept-license --backend=windows --always-run-service"Restart Windows and verify again.
An ordinary WinGet upgrade can reapply the manifest's Linux-only arguments. Until the manifest changes, upgrade with the same override:
winget upgrade --exact --id Docker.DockerDesktop --source winget `
--override "install --quiet --accept-license --backend=windows --always-run-service"After upgrading, confirm that both engines remain registered:
docker desktop engine ls| Symptom | Explanation or fix |
|---|---|
The requested operation requires elevation |
Run PowerShell as Administrator |
engine is disabled |
Docker was installed with --no-windows-containers; reinstall as described above |
Only linux appears in docker desktop engine ls |
Windows integration was disabled during installation |
no matching manifest for linux/amd64 |
Docker is still using the Linux engine; run docker desktop engine use windows |
| Container/image version error | Use --isolation=hyperv, or choose an image compatible with the host kernel |
docker-users access error |
Add only trusted users to the local docker-users group, then sign out and back in |
| Docker and Podman both installed | Use docker for Docker and podman for Podman; do not redirect DOCKER_HOST unless intentional |
Warning: this removes Docker Desktop's local containers, images, and volumes.
winget uninstall --exact --id Docker.DockerDesktopThe Windows Containers and Hyper-V features are not disabled automatically.
Other applications may depend on Hyper-V, so do not disable it casually.