Installation & First Steps

Prerequisites Check (Before Installing)

Before installing Docker Desktop, your Windows 11 needs to meet certain requirements.

Check 1: Windows Version

You need:

  • Windows 11 (64-bit) ✓ (You have this!)
  • Or Windows 10 64-bit: Pro, Enterprise, or Education (Build 19041 or higher)

To check your Windows version:

Step 1: Press Windows Key + R
Step 2: Type: winver
Step 3: Press Enter

You'll see a window showing:
- Version (should be Windows 11)
- Build number

You have Windows 11, so this is ✓


Check 2: System Requirements

Your computer needs:

Minimum Requirements:
├── 64-bit processor ✓
├── 4GB RAM (8GB recommended)
├── BIOS-level hardware virtualization support
└── WSL 2 (Windows Subsystem for Linux)

To check if virtualization is enabled:

Step 1: Press Ctrl + Shift + Esc (Open Task Manager)
Step 2: Click "Performance" tab
Step 3: Click "CPU"
Step 4: Look at bottom right

You should see:
"Virtualization: Enabled" ✓

If it says "Disabled":
└── You need to enable it in BIOS

Is virtualization enabled on your system?

  • If YES, continue below
  • If NO, You need to enable it in BIOS.

Installing Docker Desktop on Windows 11

Step 1: Download Docker Desktop

Option A: Direct Download (Recommended)

1. Open your web browser

2. Go to: https://www.docker.com/products/docker-desktop/

3. Click the big blue button: "Download for Windows"

4. File will download: "Docker Desktop Installer.exe"
   (Size: ~500MB, takes 2-5 minutes depending on internet)

Option B: From Docker Hub

1. Go to: https://hub.docker.com/

2. Click "Download Docker Desktop"

3. Choose "Windows"

4. Download starts

Step 2: Install Docker Desktop

Once download is complete:

Step 1: Locate the downloaded file
├── Usually in: Downloads folder
└── File name: "Docker Desktop Installer.exe"

Step 2: Double-click the installer
├── Windows might ask: "Do you want to allow this app to make changes?"
└── Click "Yes"

Step 3: Installation wizard opens
You'll see: "Docker Desktop Installer"

Step 4: Configuration options
You'll see two checkboxes:

[✓] Use WSL 2 instead of Hyper-V (recommended)
    └── Keep this CHECKED ✓

[✓] Add shortcut to desktop
    └── Optional (your choice)

Step 5: Click "Ok" or "Install"

Step 6: Installation begins
├── Progress bar appears
├── Takes 3-5 minutes
├── Installing components:
│   ├── Docker Engine
│   ├── Docker CLI
│   ├── Docker Compose
│   └── WSL 2 (if not already installed)

Step 7: Installation completes
└── You'll see: "Installation succeeded"

Step 8: Click "Close"

Step 3: First Time Setup

After installation:

Step 1: Docker Desktop will start automatically
├── If not, find Docker Desktop icon on desktop
└── Or search "Docker Desktop" in Start menu

Step 2: First launch screen
You'll see Docker Desktop loading:
"Starting Docker Desktop..."
├── This takes 1-2 minutes first time
└── Docker whale icon in system tray (bottom right)

Step 3: Service Agreement
├── Docker may show terms of service
└── Click "Accept" (if you agree)

Step 4: Welcome screen (might appear)
├── Quick tutorial option
├── You can skip it for now
└── Click "Skip tutorial" or close

Step 5: Check if Docker is running
Look at system tray (bottom right of taskbar):
├── You should see Docker whale icon
├── If green/white = Docker is running ✓
└── If red/gray = Docker is not running ✗

Step 4: Verify Installation

Let's make sure Docker is installed correctly!

Open Command Prompt or PowerShell:

Method 1: Using Search
├── Press Windows Key
├── Type: cmd
├── Click "Command Prompt"

Method 2: Using Run
├── Press Windows Key + R
├── Type: cmd
├── Press Enter

Method 3: PowerShell
├── Press Windows Key + X
├── Click "Windows PowerShell"

Run verification commands:

# Check Docker version
docker --version

Expected output:
Docker version 24.0.x, build xxxxxxx
(Version number might be different - that's okay!)

# Check Docker is running
docker info

Expected output:
Client:
 Version:    24.0.x
 Context:    desktop-linux
 ...
Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 ...

# If you see this information, Docker is installed correctly! ✓

If you get an error:

Error: "docker is not recognized..."

Solution:
├── Docker Desktop might not be running
├── Go to Start menu
├── Search "Docker Desktop"
├── Open it
└── Wait 1-2 minutes for it to start

Then try commands again

Understanding Docker Desktop Interface

Once Docker Desktop is running, let's explore it:

Docker Desktop Window has:

Top Menu Bar:
├── Containers (manage running containers)
├── Images (see downloaded images)
├── Volumes (data storage)
├── Dev Environments (advanced)
└── Settings (configuration)

Main Screen:
├── Quick Start Guide
├── Recently used containers
└── Learning resources

System Tray Icon (bottom right):
├── Right-click whale icon
├── Options:
│   ├── Dashboard (opens main window)
│   ├── Settings
│   ├── Restart Docker
│   ├── Quit Docker Desktop
│   └── About Docker Desktop

WSL 2 Setup (Important!)

Docker Desktop on Windows uses WSL 2 (Windows Subsystem for Linux).

Check if WSL 2 is installed:

Open PowerShell as Administrator:

Step 1: Press Windows Key
Step 2: Type: PowerShell
Step 3: Right-click "Windows PowerShell"
Step 4: Click "Run as administrator"
Step 5: Click "Yes" when prompted

Check WSL version:

wsl --list --verbose

Expected output:
  NAME                   STATE           VERSION
* docker-desktop         Running         2
  docker-desktop-data    Running         2

If you see VERSION 2, you're good! ✓

If WSL 2 is not installed (you get an error):

# Install WSL 2
wsl --install

# This will:
├── Download WSL 2
├── Install Ubuntu (default Linux)
├── Takes 5-10 minutes
└── Restart required

# After restart:
├── Ubuntu will finish setup
├── Create username/password (remember these!)
└── Then Docker Desktop will work

Test Docker Installation

Let's run your FIRST Docker command!

Open Command Prompt or PowerShell (regular, not admin):

docker run hello-world

What happens:

Step-by-step output you'll see:

1. Unable to find image 'hello-world:latest' locally
   └── Docker: "I don't have this image on your computer"

2. latest: Pulling from library/hello-world
   └── Docker: "I'm downloading it from Docker Hub"

3. xxxxxxxxx: Pull complete
   └── Docker: "Download finished"

4. Digest: sha256:xxxxxx
   Status: Downloaded newer image for hello-world:latest
   └── Docker: "Image is ready"

5. Hello from Docker!
   This message shows that your installation appears to be working correctly.
   
   To generate this message, Docker took the following steps:
   1. The Docker client contacted the Docker daemon.
   2. The Docker daemon pulled the "hello-world" image from Docker Hub.
   3. The Docker daemon created a new container from that image.
   4. The Docker daemon streamed that output to the Docker client.
   
   └── Docker: "Everything works! ✓"

If you see "Hello from Docker!" - Congratulations! 🎉 Docker is installed and working perfectly!


Common Installation Issues

Issue 1: "Docker Desktop requires a newer version of Windows"

Solution:
├── Update Windows 11
├── Go to: Settings > Windows Update
├── Click "Check for updates"
└── Install all updates

Issue 2: "Hardware assisted virtualization is not enabled"

Solution:
├── Restart computer
├── Enter BIOS (press F2, F10, Del, or F12 during boot)
├── Find "Virtualization Technology" or "VT-x"
├── Enable it
└── Save and exit BIOS

Issue 3: "WSL 2 installation is incomplete"

Solution:
Open PowerShell as admin:
wsl --update
wsl --set-default-version 2

Restart Docker Desktop

Issue 4: "Docker Desktop is starting..." (forever)

Solution 1:
├── Quit Docker Desktop completely
├── Restart computer
└── Open Docker Desktop again

Solution 2:
├── Uninstall Docker Desktop
├── Restart computer
└── Install again

Docker Desktop Settings (Optional Configuration)

Open Docker Desktop Settings:

Click Docker whale icon in system tray
→ Click "Settings" (gear icon)

Recommended Settings:

General:
[✓] Start Docker Desktop when you log in
    └── Auto-start Docker (convenient)

[✓] Use the WSL 2 based engine
    └── Better performance

Resources:
├── CPUs: 2 (default is fine for learning)
├── Memory: 2GB (can increase if you have 16GB+ RAM)
└── Disk image size: 60GB (default)

Docker Engine:
└── Leave as default (for now)

Quick Start Guide

Now that Docker is installed, here's what you can do:

✓ Docker is installed
✓ Docker is running
✓ You ran your first container (hello-world)

Next steps (we'll do together):
├── Learn basic Docker commands
├── Pull some images
├── Run containers
└── Explore Docker

Verification Checklist

Make sure everything is working:

□ Docker Desktop installed
□ Docker Desktop is running (green icon in system tray)
□ docker --version works in Command Prompt
□ docker info shows information
□ docker run hello-world completed successfully
□ You saw "Hello from Docker!" message

If all checked ✓ → Installation successful! 🎉

What We Installed

Docker Desktop for Windows includes:

Components:
├── Docker Engine (core)
├── Docker CLI (command-line interface)
├── Docker Compose (multi-container tool)
├── Docker Content Trust (security)
├── Kubernetes (optional, advanced)
└── WSL 2 backend (Linux compatibility)

You can now:
├── Run Linux containers on Windows
├── Use all Docker commands
├── Build and deploy applications
└── Learn Docker!

Excellent! Docker is now installed on your Windows 11 system!


No comments:

Post a Comment

Installation & First Steps

Prerequisites Check (Before Installing) Before installing Docker Desktop, your Windows 11 needs to meet certain requirements. Check 1: Windo...