-
Notifications
You must be signed in to change notification settings - Fork 8
Windows Guide
On a Windows host, two prerequisite requirements need to be enabled.
- Virtualization - For running a virtualized environment on top of the host layer.
- WSL - For running the Linux subsystem on Windows.
We'll then leverage the Linux subsystem to run the tool in the Linux subspace. Docker in Windows also ideally runs everything in Linux space.
On most PCs that run Windows as the main operating system, you will need to enable Virtualization in the BIOS. Refer to this BIOS guide as a reference for ASUS motherboards to turn on this feature. For other motherboard brands, refer to your motherboard guide or look up your motherboard make and version.
Virtualization is needed to allow Docker to run on top as a hypervisor as it's essentially running a virtual environment underneath like a VM (Virtual Machine).
Since Windows 10 May 2020 (2004) it is possible to install WSL2 (Windows Subsystem For Linux) with just a single command and no hassle.
First, we'll need to set up the Windows Subsystem for Linux. To do this, open the command line as administrator. Run these commands to install WSL:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
After the operation finishes, restart Windows. Then, open the command line as administrator, and run this command:
wsl --set-default-version 2
Update WSL in case it requires updating first:
wsl --update
Now on the command line type:
wsl --install -d Ubuntu
This will configure and install WSL2 with Ubuntu as the distro.
Once installed, just simply type:
wsl
This will switch from the Windows terminal to the Linux shell terminal. Now you're basically in Linux.
Configure your username and password.
The tool is capable of installing Docker directly as it utilises the Windows Package Manager Winget
.
Despite WSL on Windows being a full-fledged Linux distribution, it does differ slightly. Even though the image used is Ubuntu, it won't be possible to install Docker from Ubuntu using the apt
. It will need to resort to Windows space and use Winget
.
Refer to the Docker Installation guide section for Windows to install Docker manually.