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
| Resource | Link |
|---|---|
| Previous | Node.js & npm install |
| Next | — (last lesson in Setup Guide) |
| Time | ~25 minutes |
| What you need | Windows 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 --installRestart your computer when it finishes. Then confirm the version is 2:
wsl --statusYou 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
- Download Docker Desktop from docker.com/products/docker-desktop.
- Windows: choose the WSL 2-based engine option if the installer asks. Leave the rest default.
- 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 infodocker 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 DesktopYou 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-worldOn 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 / action | What it does |
|---|---|
| Docker Desktop (tray icon) | Starts/stops the engine. Closing the window does not stop it |
docker info | Proves the engine is up — prints a Server section when healthy |
docker run hello-world | Downloads and runs a tiny test container |
docker run --rm -it alpine:3.21 sh | Opens a throwaway shell from the Alpine image |
wsl --status | Windows only — confirms WSL 2 is the default backend |
Practice
Do this now:
- Windows: run
wsl --install, reboot, confirmwsl --statussays Default Version 2 (Mac: skip). - Install Docker Desktop (pick Apple Silicon vs Intel on Mac).
- Start Docker Desktop and wait for the tray icon.
- Run
docker info— the Server section must appear. - Run
docker run hello-worldand read the success line. - Optional: the
alpine:3.21one-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:
- Docker engine running;
docker versionOK. - One container run successfully.
- Know how to stop Desktop to free RAM.
- Link forward to courses that use containers (e.g. MLOps).
Common mistakes
- Debugging app code when the engine is simply off.
- Running heavy images on low-RAM laptops without stopping Desktop later.
- Assuming cloud host Docker equals local Desktop setup.
Checklist
- [ ]
wsl --statusshows Default Version 2 (Windows) - [ ] Docker Desktop engine is running (tray icon is not red)
- [ ]
docker infoprints a Server section - [ ]
docker run hello-worldsucceeds - [ ] I know the difference between closing the dashboard window and stopping the engine
Verified against tool install guides on this site documentation, September 2026.