Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Docker on Windows

Turn on WSL and Virtual Machine Platform, then install Docker Desktop.

Windows Hosting2 min read5 steps8 screenshots

System requirements

  • Windows 10 (64-bit, version 2004 or newer) or Windows 11.
  • A 64-bit processor with virtualization turned on in the BIOS.
  • At least 4 GB of RAM.

Step 1: Turn on the WSL feature

Open PowerShell as administrator and run:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enabling the WSL feature
  • /online works on the running system.
  • /enable-feature turns a feature on.
  • /featurename names the feature.
  • /norestart stops an automatic restart.

Step 2: Turn on Virtual Machine Platform

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enabling Virtual Machine Platform

Restart the computer. Then set WSL 2 as the default:

wsl --set-default-version 2

Step 3: Install Docker Desktop

  1. Download Docker Desktop for Windows from the Docker website.
    Downloading Docker Desktop
  2. Run the installer. Keep Use WSL 2 instead of Hyper-V ticked.
    The Docker Desktop installer
  3. Wait for it to finish, then click Close and restart if asked.
    The installation details
    The installation is complete
  4. Start Docker Desktop. Accept the service agreement and keep the recommended settings.
    The recommended settings
  5. Docker Desktop opens. You can see your containers there.
    The Docker containers screen

Check Docker

Open PowerShell and run:

docker --version
docker run hello-world

If you see a welcome message, Docker works.

What Docker is for

  • Portability. Containers behave the same on every system.
  • Isolation. Apps and their dependencies are kept apart.
  • Efficiency. Containers share the kernel, so they are light.
  • Scalability. Start many copies quickly.
  • Teamwork. Developers and operators use the same images.

Advantages

  • Consistency between development, testing and production.
  • Lower resource use than virtual machines.
  • Fast start and stop.
Note: Docker Desktop has license terms for larger businesses. Check them for your company.

Quick recap

  • Turn on WSL and Virtual Machine Platform, and restart.
  • Install Docker Desktop with the WSL 2 backend.
  • Test with docker run hello-world.