How to Install Docker on Windows

SupportFly
4 min readFeb 19, 2024

--

Docker is a powerful platform that enables developers to build, share, and run applications seamlessly in containers. Containers package up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. For Windows users, getting Docker up and running on their system can open up a world of possibilities for development and testing. This guide will walk you through the detailed steps to install Docker on a Windows system, covering prerequisites, installation steps, and some basic Docker commands to get you started.

We also offer Docker Consulting services for those who are using Docker or are planning to use it. You can visit our website to know more about it.

Prerequisites

Before installing Docker on Windows, there are a few prerequisites you need to ensure are met:

  • Windows Version: Ensure you are running Windows 10 64-bit: Pro, Enterprise, or Education (Build 15063 or later), or Windows 11. Docker requires Hyper-V technology, which is not available in Windows Home editions until recent updates. If you have a Home edition, ensure it’s updated for Hyper-V support.
  • Hardware Requirements: Your system must support virtualization technology and have it enabled in BIOS. Docker Desktop for Windows requires a minimum of 4GB RAM and recommends SSD storage for optimal performance.
  • WSL 2: For Windows 10 users, Docker Desktop uses the Windows Subsystem for Linux 2 (WSL 2) backend. Ensure WSL 2 is installed and set up on your system. Windows 11 users have this by default.

Steps to install Docker on Windows

Step 1: Enable Hyper-V and WSL 2

Before installing Docker, you need to enable Hyper-V (for virtualization) and the Windows Subsystem for Linux version 2 (WSL 2) on your system. Here’s how:

  1. Enable Hyper-V:
  • Open Control Panel > Programs > Programs and Features > Turn Windows features on or off.
  • Check the boxes for “Hyper-V” and “Windows Subsystem for Linux.”
  • Click OK and reboot your system.

2. Install WSL 2:

  • Open PowerShell as Administrator and run:
  • This command installs WSL 2 and requires a system reboot.

Step 2: Download Docker Desktop for Windows

Navigate to the Docker Hub website and download the Docker Desktop installer for Windows. Choose the stable version for the best compatibility.

Step 3: Install Docker Desktop

  • Run the Installer: Locate the downloaded .exe file and double-click to run the installer.
  • Follow the Installation Prompts: Accept the license, agree to the terms, and choose the installation location.
  • Configuration: You may be prompted to enable the WSL 2 based engine. It’s recommended to use WSL 2 for improved performance and compatibility.
  • Finish Installation: Once the installation is complete, click “Close” to finish.

Step 4: Verify Installation

After installation, launch Docker Desktop from the Start Menu. Docker will take a few moments to start up. Once running, you’ll see the Docker icon in the system tray, indicating that Docker is running.

To verify Docker is installed correctly, open a terminal (Command Prompt or PowerShell) and run:

This command should return the Docker version installed, confirming the successful installation.

Step 5: Run Your First Docker Container

To test your Docker installation, try running a simple container:

This command downloads a test image and runs it in a container. If successful, you’ll see a message indicating that Docker is installed correctly and running.

Basic Docker Commands

Here are a few basic Docker commands to get you started:

  • docker run [image]: Runs a container from an image.
  • docker ps: Lists running containers.
  • docker images: Lists images that are locally stored.
  • docker pull [image]: Pulls an image from Docker Hub.
  • docker rm [container id]: Removes a container.
  • docker rmi [image id]: Removes an image.

Conclusion

Installing Docker on Windows is a straightforward process that unlocks the powerful capabilities of containerization for your development projects. By following this comprehensive guide, you’re now equipped to start exploring Docker and containerizing your applications for easier development, sharing, and deployment.

--

--

SupportFly

SupportFly is an industry-level IT & Server Management Company with proven expertise and technical experts. https://www.supportfly.io