DEV Community

Cover image for Installing Docker On Windows
Binat
Binat

Posted on

1

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!

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs