DEV Community

Cover image for Installing Docker On Windows
Binat
Binat

Posted on

Installing Docker On Windows

It was a little finicky for me to use Docker from the Windows Command Line.

This tutorial will ensure you have no such problems.

There are three main steps:

  1. Install the Windows Subystem (WSL) 2 Linux distribution
  2. Download and Install Docker Desktop for Windows
  3. Configure Docker Desktop to access Docker from WSL

Installing WSL 2

Note: For a general tutorial see the WSL documentation here

Open the command prompt in administrator mode by right clicking and selecting run as administrator.

Run the following command wsl --install

Check which version is installed with wsl -l -v

If it is not already version 2, set WSL to the correct distribution with wsl --set-default-version 2

Download and Install Docker Desktop

Download and install Docker Desktop for Windows from here

Once installation is finished, you should be able to open the Docker Desktop application.

Configure Docker Desktop

In Docker Desktop, go to Settings, then select the resources tab. Set the terminal to be integrated with the WSL distribution.

Image description

Docker should now work from the command line.

Thank you for reading my first post!

Top comments (0)