Rana Maninder Singh
Lesson 8 of 8Setup Guide

Installation: Docker Desktop

Lesson opener

In one line: Install Docker Desktop, confirm the Docker engine is running, and prove you can run a tiny throwaway container. Docker lets you run databases, Postgres, and MLOps tools in isolated boxes instead of polluting your laptop.

Why it matters: This shows up at work when you need to install Docker Desktop, confirm the Docker engine is running, and prove you can run a tiny throwaway container. Docker lets you run databases, Postgres, and MLOps tools in isolated

Before this lesson: Node.js & npm install

Before you start

ResourceLink
PreviousNode.js & npm install
Next— (last lesson in Setup Guide)
Time~25 minutes
What you needWindows 11 Pro/Enterprise/Education (or Windows 10 64-bit) or a Mac. Windows 11 Home works with WSL 2 enabled (steps below)

What you will learn

Install Docker Desktop, confirm the Docker engine is running, and prove you can run a tiny throwaway container. Docker lets you run databases, Postgres, and MLOps tools in isolated boxes instead of polluting your laptop. The two commands that matter — docker info and docker run hello-world — prove the install, and this lesson ends with both green.

Tutorial 1 — Windows: enable the WSL 2 backend first

Docker Desktop on Windows runs Linux containers through WSL 2 (Windows Subsystem for Linux). The order matters: WSL 2 must be enabled before Docker Desktop, or Docker falls back to a slower Hyper-V path that Windows 11 Home cannot use.

Open PowerShell as Administrator and run:

wsl --install

Restart your computer when it finishes. Then confirm the version is 2:

wsl --status

You want a line reading Default Version: 2. If it says 1, run wsl --set-default-version 2.

Mac: there is no WSL step. On Apple Silicon (M1/M2/M3…) you install the Apple Silicon build; on an Intel Mac the Intel build. Both are listed on the Docker download page — downloading the wrong one is the most common Mac failure.


Tutorial 2 — Install Docker Desktop

  1. Download Docker Desktop from docker.com/products/docker-desktop.
  2. Windows: choose the WSL 2-based engine option if the installer asks. Leave the rest default.
  3. Finish the install and start Docker Desktop. It shows a whale-in-box icon and launches a dashboard.

Common mistake: closing the Docker Desktop dashboard does not stop the engine. Docker Desktop is designed to keep running in the background — close the window, not the app. If the whale icon in your system tray turns green, the engine is up.


Tutorial 3 — Prove the engine with docker info

Open a normal terminal (PowerShell on Windows, Terminal on Mac) and run:

docker info

docker info fails loudly (with error during connect) when the engine is not running. That is the correct behavior. If you see the error, Docker Desktop is still starting — wait for the whale icon, then retry.

Expected result: a long block ending with lines like:

Server Version: 2x.x.x
Operating System: Docker Desktop

You only need the Server section to appear. A client version without a Server block means the engine is down.


Tutorial 4 — First container: hello-world

docker run hello-world

On the first run Docker downloads the tiny hello-world image, runs it, and prints a success message ending with something like:

This message shows that your installation appears to be working correctly.

Use this when: you need to prove an install is healthy. If hello-world runs, the engine, image pull, and container runtime all work — no further diagnosis needed.

Not useful here: docker version prints both client and server versions and is also healthy, but hello-world additionally proves you can actually run a container, which is the step later courses depend on.


Tutorial 5 — Where Docker is used later

On this site Docker appears when a lesson says "run it in a container" — usually a database or model service. A predictable check for the whole setup:

docker run --rm -it alpine:3.21 sh -c "echo docker works && cat /etc/os-release"

You should see docker works and an Alpine Linux release line. --rm deletes the container after it exits so nothing permanent accumulates on your machine.


Essential commands

Command / actionWhat it does
Docker Desktop (tray icon)Starts/stops the engine. Closing the window does not stop it
docker infoProves the engine is up — prints a Server section when healthy
docker run hello-worldDownloads and runs a tiny test container
docker run --rm -it alpine:3.21 shOpens a throwaway shell from the Alpine image
wsl --statusWindows only — confirms WSL 2 is the default backend

Practice

Do this now:

  1. Windows: run wsl --install, reboot, confirm wsl --status says Default Version 2 (Mac: skip).
  2. Install Docker Desktop (pick Apple Silicon vs Intel on Mac).
  3. Start Docker Desktop and wait for the tray icon.
  4. Run docker info — the Server section must appear.
  5. Run docker run hello-world and read the success line.
  6. Optional: the alpine:3.21 one-liner from Tutorial 5.

Teacher walkthrough: Desktop running, then hello container

All figures illustrative.

Step 1 — Install Docker Desktop; complete OS-specific virt requirements.

Step 2 — Wait until engine is running (whale steady); docker version.

Step 3 — Run a tiny pull/run as the lesson shows (hello-world or course image).

Step 4 — Know stop/start; containers are not a substitute for understanding the app.

Failure example: commands before engine is up

Symptom: Cannot connect to the Docker daemon.

Diagnosis: Desktop not finished starting, or WSL/virt disabled.

Correction: Start Desktop; fix WSL2/virt per official docs; retry docker version.

Validation: docker version shows Client and Server.

Guided practice

Is Docker Desktop required to read a Dockerfile in the Git/MLOps courses?

Complete solution: No for reading; yes (or another engine) when you must build/run the image locally.

Independent practice

Acceptance criteria:

Common mistakes

  1. Debugging app code when the engine is simply off.
  2. Running heavy images on low-RAM laptops without stopping Desktop later.
  3. Assuming cloud host Docker equals local Desktop setup.

Checklist

  • [ ] wsl --status shows Default Version 2 (Windows)
  • [ ] Docker Desktop engine is running (tray icon is not red)
  • [ ] docker info prints a Server section
  • [ ] docker run hello-world succeeds
  • [ ] I know the difference between closing the dashboard window and stopping the engine

Verified against tool install guides on this site documentation, September 2026.