Docker Lesson 5 – Installing Docker | Dataplexa
Section I · Lesson 5

Installing Docker

Four lessons of theory, zero minutes of actually running Docker. That changes right now. By the end of this lesson, Docker is installed, running, and verified on your machine.

Installation is different depending on your operating system — and getting it slightly wrong is the most common reason beginners spend an hour confused before writing a single command. This lesson covers all three platforms clearly, with a verification step at the end that confirms every component of the architecture from Lesson 4 is working correctly.

Docker Desktop vs Docker Engine — The Right Tool for Each Platform

Before installing anything, one important distinction: Docker Desktop and Docker Engine are two different things, and which one you install depends on your OS.

Docker Desktop is a full application for macOS and Windows. It bundles the Docker Engine, the Docker CLI, Docker Compose, and a graphical interface into one installer. It also handles a key problem on macOS and Windows — since Docker containers need a Linux kernel to run, Docker Desktop quietly runs a lightweight Linux VM in the background. You never see it, but it's there.

Docker Engine is the raw Daemon itself — no GUI, no VM needed. On Linux, containers run directly on the host kernel. This is the version used on servers and in CI/CD pipelines. It's faster, lighter, and has no graphical overhead.

macOS

Intel or Apple Silicon

↓ Download for macOS

Windows

Windows 10 / 11 with WSL 2

↓ Download for Windows

Linux

Ubuntu, Debian, CentOS

↓ Install Docker Engine

Installing on macOS

macOS installation is the simplest of the three. Docker Desktop ships as a standard .dmg file — download, drag to Applications, done. The only thing to check first is your chip architecture, since there are separate builds for Intel Macs and Apple Silicon (M1/M2/M3).

↓ Download for Intel Mac ↓ Download for Apple Silicon

# Step 1 — Check your chip to download the right installer
uname -m
# x86_64  → Intel Mac   → download Docker Desktop for Intel
# arm64   → Apple Silicon → download Docker Desktop for Apple Silicon

# Step 2 — After installing, start Docker Desktop from Applications
# Step 3 — Verify Docker is running
docker --version
arm64
Docker version 25.0.3, build 4debf41

What just happened?

uname -m prints your machine's hardware architecture. arm64 means Apple Silicon — you need the ARM build of Docker Desktop. x86_64 means Intel — you need the Intel build. Downloading the wrong one is a common mistake that causes Docker to run slowly or not at all on Apple Silicon Macs. The second output confirms Docker is installed and shows the version number — 25.0.3 here, yours may differ.

Installing on Windows

Docker on Windows requires WSL 2 — the Windows Subsystem for Linux, version 2. WSL 2 gives Windows a real Linux kernel, which Docker needs. Docker Desktop installs WSL 2 automatically if it's not already present, but enabling it first saves time.

↓ Download Docker Desktop for Windows

# Run this in PowerShell as Administrator
# Step 1 — Enable WSL 2 (if not already enabled)
wsl --install
# This installs WSL 2 and Ubuntu by default — restart when prompted

# Step 2 — After restarting, download and run Docker Desktop installer
# from https://docs.docker.com/desktop/install/windows-install/

# Step 3 — Verify inside PowerShell or Windows Terminal
docker --version
Installing: Virtual Machine Platform
Installing: Windows Subsystem for Linux
Installing: Ubuntu
The requested operation is successful.

Docker version 25.0.3, build 4debf41

What just happened?

wsl --install sets up WSL 2 and a default Linux distribution in one command — this is what gives Windows the Linux kernel Docker needs underneath. After the restart and Docker Desktop installation, docker --version confirms the CLI is available and connected. On Windows, Docker Desktop sets everything up automatically — WSL 2 integration, the Daemon, the CLI — so you never have to configure them separately.

Windows Home vs Windows Pro

Older guides mention needing Windows Pro for Docker. That was true before WSL 2 existed. With WSL 2, Docker Desktop runs on Windows 10 Home and Windows 11 Home just fine. If you see references to Hyper-V requirements, those guides are outdated.

Installing on Linux (Ubuntu)

Linux gets Docker Engine — the raw, server-grade version. No GUI, no background VM, no overhead. Containers run directly on the host kernel. The official Docker install script handles all repository setup automatically.

↓ Ubuntu Install Guide ↓ All Linux Distros

# Step 1 — Download and run the official Docker install script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# This adds Docker's official apt repository and installs Docker Engine

# Step 2 — Add your user to the docker group (avoids needing sudo every time)
sudo usermod -aG docker $USER
# Log out and back in for this to take effect

# Step 3 — Start the Docker service and enable it on boot
sudo systemctl start docker
sudo systemctl enable docker

# Step 4 — Verify
docker --version
# Executing docker install script
+ sh -c apt-get update -qq
+ sh -c apt-get install -y docker-ce docker-ce-cli containerd.io
...
Client: Docker Engine - Community
 Version: 25.0.3

Docker version 25.0.3, build 4debf41

What just happened?

The install script adds Docker's official package repository to your system and installs three packages: docker-ce (the Docker Engine), docker-ce-cli (the Docker Client), and containerd.io (the low-level container runtime Docker sits on top of). The usermod command adds you to the docker group so you can run Docker commands without sudo every time. The systemctl enable command ensures Docker starts automatically when your server reboots — critical for production servers.

Verifying the Full Installation

A version number appearing doesn't fully confirm everything is working. This single command tests the complete architecture from Lesson 4 — the Client, the Daemon, and the Registry — all in one shot.

docker run hello-world
# This command tests all three architecture components at once:
# 1. Docker Client — receives and forwards your command
# 2. Docker Daemon — pulls the image and creates the container
# 3. Docker Registry — serves the hello-world image from Docker Hub
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:88ec0acaa3ec199d3b7efd73ee5f0002f9b6bab36d57c93d2d7c2bdc3e01c2
Status: Downloaded newer image for hello-world:latest

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 the Docker Hub.
 3. The Docker daemon created a new container from that image.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

Installation Confirmed

If you see "Hello from Docker!" — you're done. The Client works, the Daemon works, and Docker Hub is reachable. Everything from Lesson 4's architecture diagram just ran in real life. If this command fails, the output will tell you exactly which component broke — a pull error means Registry connectivity, a daemon error means the Daemon isn't running.

Teacher's Note

On Linux servers, always run sudo systemctl enable docker after installing. Without it, Docker stops when the server reboots and your containers disappear — a painful lesson at 2am in production.

Practice Questions

1. On macOS and Windows, the recommended Docker installation that bundles the Engine, CLI, and a GUI into one package is called what?



2. Docker on Windows requires a Linux kernel to run containers. The Windows feature that provides this kernel is called what?



3. On Linux, adding your user to the ___ lets you run Docker commands without sudo every time.



Quiz

1. On which operating system does Docker run most efficiently, with no background VM required?


2. Why is docker run hello-world the recommended verification command after installing Docker?


3. On a Linux production server, which command ensures Docker starts automatically after a reboot?


Up Next · Lesson 6

Docker CLI Basics

Docker is installed — now let's learn the handful of commands you'll use every single day, and exactly what each one does under the hood.