DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Docker Tutorial

Introduction to docker
Why Use Docker?
Docker vs Virtual Machines
Installing Docker
Key Docker Concepts
Docker Images
Docker Containers
Writing Dockerfiles
Docker Volumes

Installing Docker on Windows

PreviousPrev
Next

Complete guide to installing Docker Desktop on Windows. Learn how to set up WSL 2, install Docker Desktop, and configure your Windows development environment.

Prerequisites

Before installing Docker on Windows, ensure your system meets these requirements:

Windows Requirements

  • Windows 10 or 11: 64-bit Pro, Enterprise, or Education (Build 19041 or higher)
  • WSL 2: Windows Subsystem for Linux 2 must be enabled
  • Virtualization: Hardware virtualization must be enabled in BIOS
  • RAM: Minimum 4GB (8GB recommended)

Installing Docker Desktop on Windows

Docker Desktop is the easiest way to run Docker on Windows, providing a complete development environment with a user-friendly interface.

Step 1: Enable WSL 2

Open PowerShell as Administrator and run:

# Enable WSL
wsl --install

# Set WSL 2 as default version
wsl --set-default-version 2

Restart your computer after enabling WSL.

Step 2: Download Docker Desktop

Visit the official Docker website: https://www.docker.com/products/docker-desktop Click "Download for Windows" Run the installer (Docker Desktop Installer.exe)

Step 3: Install Docker Desktop

Double-click the installer to run it Ensure "Use WSL 2 instead of Hyper-V" is selected Follow the installation wizard Click "Close and restart" when prompted

Step 4: Start Docker Desktop

Launch Docker Desktop from the Start menu Accept the service agreement Wait for Docker to start (you'll see the Docker icon in the system tray) You may be asked to complete a tutorial

Step 5: Verify Installation

Open PowerShell or Command Prompt and run:

docker --version
docker run hello-world

You should see Docker's version information and a welcome message from the hello-world container.

Configuring Docker Desktop on Windows

Resources Allocation

Proper resource allocation ensures optimal performance:

CPU

  • Development: 2-4 CPUs
  • Production builds: 4-8 CPUs

Memory

  • Minimal: 2GB
  • Development: 4-8GB
  • Heavy workloads: 8-16GB

Disk

  • Minimal: 32GB
  • Recommended: 64GB or more

Docker Desktop Settings

Access settings through the Docker Desktop menu:

  1. General

    • Start Docker Desktop when you log in
    • Use WSL 2 based engine
    • Send usage statistics (optional)
  2. Resources

    • Adjust CPU, Memory, Swap, and Disk limits
    • Configure file sharing directories
  3. Docker Engine

    • Edit daemon.json for advanced configuration
    • Configure registry mirrors
    • Set insecure registries
  4. WSL Integration

    • Enable integration with your WSL 2 distros
    • Select which distributions can access Docker

Troubleshooting Windows Installation

WSL 2 Not Available

Problem: "WSL 2 installation is incomplete"

Solution:

  1. Open PowerShell as Administrator
  2. Run: wsl --install
  3. Restart your computer
  4. Verify with: wsl --status

Virtualization Not Enabled

Problem: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS"

Solution:

  1. Restart your computer
  2. Enter BIOS/UEFI settings (usually F2, F10, or Del during boot)
  3. Find virtualization settings (Intel VT-x or AMD-V)
  4. Enable virtualization
  5. Save and exit BIOS

Docker Service Won't Start

Problem: Docker Desktop fails to start

Solution:

  1. Ensure WSL 2 is properly installed
  2. Check Windows Event Viewer for errors
  3. Try resetting Docker Desktop to factory defaults
  4. Reinstall Docker Desktop if necessary

Cannot Pull Images

Problem: "Error response from daemon: Get https://registry-1.docker.io/v2/"

Solution:

  1. Check internet connection
  2. Verify firewall settings
  3. Configure proxy if needed in Docker Desktop settings

Testing Your Installation

Let's verify everything works correctly:

1. Check Docker Version

docker --version
docker compose version

2. Run a Test Container

docker run -d -p 8080:80 nginx

Then visit http://localhost:8080 in your browser. You should see the Nginx welcome page!

3. List Running Containers

docker ps

4. Stop and Remove the Container

docker stop $(docker ps -q)
docker rm $(docker ps -aq)

Windows-Specific Tips

Using WSL 2 with Docker

Docker Desktop integrates seamlessly with WSL 2. You can:

  • Run Docker commands from WSL 2 distributions
  • Access Windows files from containers
  • Use Linux-based development workflows

File Performance

For best performance:

  • Store project files in the WSL 2 filesystem (not Windows filesystem)
  • Access via \\wsl$\Ubuntu\home\username\projects
  • Use WSL 2 terminal for development

PowerShell vs CMD

Docker works with both PowerShell and Command Prompt, but PowerShell is recommended for better scripting capabilities.

What's Next?

Now that Docker is installed on Windows, you can:

  • Learn about Docker images and containers
  • Build your first Docker application
  • Explore Docker Compose for multi-container apps
  • Set up a complete development environment

Your Docker journey on Windows has begun!

PreviousPrev
Next

Continue Learning

Why Use Docker?

Discover the key benefits of Docker including consistency, isolation, portability, and efficiency. Explore real-world use cases across development, microservices, and CI/CD.

·

Docker vs Virtual Machines

Understand the key differences between Docker containers and virtual machines. Learn about architecture, resource usage, startup times, and when to use each technology.

·

Installing Docker

Step-by-step guide to installing Docker on Windows, macOS, and Linux. Set up Docker Desktop and verify your installation for a smooth development experience.

20 min·Easy

Explore Related Topics

Ku

Kubernetes Tutorials

Orchestrate your Docker containers at scale

CI

CI/CD Tutorials

Automate Docker builds and deployments in pipelines

Try the Tool

Dockerfile Linter

Instantly lint your Dockerfile for best-practice violations and security issues.

On This Page

PrerequisitesWindows RequirementsInstalling Docker Desktop on WindowsStep 1: Enable WSL 2Step 2: Download Docker DesktopStep 3: Install Docker DesktopStep 4: Start Docker DesktopStep 5: Verify InstallationConfiguring Docker Desktop on WindowsResources AllocationDocker Desktop SettingsTroubleshooting Windows InstallationWSL 2 Not AvailableVirtualization Not EnabledDocker Service Won't StartCannot Pull ImagesTesting Your Installation1. Check Docker Version2. Run a Test Container3. List Running Containers4. Stop and Remove the ContainerWindows-Specific TipsUsing WSL 2 with DockerFile PerformancePowerShell vs CMDWhat's Next?