Minimal PowerShell automation to install Docker Desktop on Windows (WSL2) with custom install + data-root paths so Docker/WSL data can live on a secondary drive.
- Runs the Docker Desktop installer with:
- custom app install directory
- custom WSL2 data root
- custom Windows containers data root
- Auto-elevates to Administrator if needed
- Download the Docker Desktop installer from Docker Desktop.
- Put the installer next to this script as
Docker Desktop Installer.exe. - Run:
.\install-docker.ps1.\install-docker.ps1 `
-InstallDir "D:\Dev Program Files\Docker\App" `
-WslDataRoot "D:\Dev Program Files\Docker\wsl" `
-WindowsContainersDataRoot "D:\Dev Program Files\Docker\windows"- Windows 10/11
- WSL 2 enabled
ecx2f
MIT. See LICENSE.