Install Docker Desktop App in Windows

Songxibin
4 min readApr 14, 2021

This document is to provide a detailed guideline how I install this Docker App in Windows.

  1. make sure your Windows Hyper-V is installed

Open a PowerShell console as Administrator.

Run the following command in PowerShell

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

enable the Hyper-V role using DISM:

Open up a PowerShell or CMD session as Administrator

Type the following command in PowerShell

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

Right click on the Windows button and select ‘Apps and Features’.

Select Programs and Features on the right under related settings.

Select Turn Windows Features on or off.

Select Hyper-V and click OK.

2. install Windows Subsystem for Linux (WSL)

Download the installer from the Windows link.

Run the update package downloaded.

Set WSL 2 as your default version: Run in Powershell

wsl --set-default-version 2

Install your Linux distribution

Open the Microsoft Store and select your favorite Linux distribution

I use Alpine WSL as the minium size.

From the distribution’s page, select “Get”.

After downloading, you can find it from your windows.

Press and launch it. The first time you launch a newly installed Linux distribution, a console window will open and you’ll be asked to wait for a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second.

You will then need to create a user account and password for your new Linux distribution.

Set your distribution version to WSL 1 or WSL 2

Open up a PowerShell or CMD session as Administrator

Type the following command in PowerShell

wsl --list --verbosewsl --set-version <distribution name> <versionNumber>

Install Docker Desktop on Windows

  1. Double-click Docker Desktop Installer.exe to run the installer.
  2. If you haven’t already downloaded the installer (Docker Desktop Installer.exe), you can get it from Docker Hub. It typically downloads to your Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.
  3. When prompted, ensure the Enable Hyper-V Windows Features or the Install required Windows components for WSL 2 option is selected on the Configuration page.
  4. Follow the instructions on the installation wizard to authorize the installer and proceed with the install.
  5. When the installation is successful, click Close to complete the installation process.

Start Docker Desktop

Docker Desktop does not start automatically after installation. To start Docker Desktop, search for Docker, and select Docker Desktop in the search results.

When the whale icon in the status bar stays steady, Docker Desktop is up-and-running, and is accessible from any terminal window.

If the whale icon is hidden in the Notifications area, click the up arrow on the taskbar to show it. To learn more, see Docker Settings.

When the initialization is complete, Docker Desktop launches the onboarding tutorial. The tutorial includes a simple exercise to build an example Docker image, run it as a container, push and save the image to Docker Hub.

Congratulations! You are now successfully running Docker Desktop on Windows.

--

--