Skip to content
5 min read·Lesson 2 of 10

Docker Architecture and Installation

Learn how Docker is structured — client, daemon, registry, and runtime — and install it on Linux, Mac, or Windows.

Before we run our first container, it helps to understand how Docker is structured. The "Docker" you install is actually several cooperating components.

The Components

  • Docker CLI (docker): The command-line tool you type into. It sends requests to the daemon.
  • Docker daemon (dockerd): A background service that manages images, containers, networks, and volumes. The CLI talks to it over a Unix socket (or TCP).
  • containerd: The lower-level runtime the daemon delegates to. It pulls images, manages container lifecycles, and calls runc to start processes.
  • runc: The lowest-level runtime — actually creates the namespaces and cgroups for a container.
  • Registry: Where images live. Docker Hub is the default public registry; you can also use private registries.
  docker CLI  ──▶  dockerd  ──▶  containerd  ──▶  runc  ──▶  process

You typically only think about the CLI and the daemon — but knowing the layers helps when you read about Kubernetes (which talks to containerd directly, skipping dockerd) or about rootless container runtimes.

Installing Docker

macOS and Windows

Install Docker Desktop from docker.com/products/docker-desktop. It bundles the engine, CLI, Compose, a small Linux VM (since macOS and Windows don't have a Linux kernel natively), and a GUI dashboard. Free for personal use and small businesses.

Linux

Install Docker Engine via your distribution's package manager. On Debian/Ubuntu:

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER     # so you can run docker without sudo
newgrp docker                     # apply group change in current shell

On Red Hat / Fedora / Amazon Linux, packages are available in the official Docker repos.

Alternatives

  • Podman — drop-in CLI replacement, rootless and daemonless, default on Red Hat / Fedora.
  • colima — lightweight Docker Desktop alternative for macOS.
  • Rancher Desktop — open-source desktop that bundles containerd and Kubernetes.

Verify Your Installation

docker --version
docker info       # shows daemon details
docker run hello-world

The hello-world command does several things at once: the daemon checks if the image is local; if not, it pulls it from Docker Hub; it creates a container from that image; runs it (which prints a welcome message); and exits. If you see the welcome text, every layer of the stack works.

Common Commands at a Glance

CommandWhat it does
docker run IMAGEStart a new container from an image
docker psList running containers
docker ps -aList all containers (including stopped)
docker imagesList local images
docker pull IMAGEDownload an image from a registry
docker stop IDStop a running container
docker rm IDRemove a stopped container
docker rmi IMAGERemove an image
docker logs IDView a container's stdout/stderr
docker exec -it ID bashOpen a shell inside a running container

The next lesson dives deeper into images — how they are layered, how to pull them, and how registries work.

Key Takeaways

  • Docker uses a client-server architecture: the docker CLI talks to the dockerd daemon over a socket.
  • The daemon manages images, containers, networks, and volumes; the runtime (containerd) actually starts processes.
  • Docker Desktop is the easiest install on Mac and Windows; Linux gets the engine via package managers.
  • A registry (Docker Hub by default) stores and distributes images.
  • Run "docker run hello-world" to verify your installation works end-to-end.

Test your knowledge

Try exam-style practice questions to reinforce what you've learned.

Practice Questions →