Introduction and Core Concepts
This module covers the foundational knowledge you need before writing your first Dockerfile. By the end, you will understand what Docker is, how it evolved, who governs it, and how to evaluate whether it fits your use case.
Docker is more than a CLI tool. Its architecture, licensing model, and governance all influence how you plan infrastructure. Understanding the full picture early prevents costly assumptions later.
How Docker Works at a High Level
Docker sits between your application code and the host operating system. It provides a standard packaging format (images) and a lightweight runtime (containers) so that your app behaves the same on every machine.
flowchart TB
subgraph Client ["Docker Client (CLI)"]
CMD["docker build / pull / run"]
end
subgraph Host ["Docker Host (Daemon)"]
DAEMON[dockerd]
IMG[Images]
CONT[Containers]
VOL[Volumes]
NET[Networks]
DAEMON --> IMG
DAEMON --> CONT
DAEMON --> VOL
DAEMON --> NET
end
subgraph Registry ["Container Registry"]
HUB[("Docker Hub")]
PVT[("Private Registry")]
end
Client -->|REST API / Socket| DAEMON
DAEMON <-->|Pull / Push| Registry
You interact with Docker through the CLI (client). The CLI sends instructions to the Docker daemon (dockerd) running on the host. The daemon manages images, containers, volumes, and networks — and can pull or push images from a registry like Docker Hub.
Core Terminology
| Term | What It Is | Analogy |
|---|---|---|
| Image | A read-only template containing your application and its dependencies | A recipe — you follow it to make the same dish every time |
| Container | A running instance of an image, isolated from the host and other containers | A dish made from the recipe — disposable, reproducible |
| Volume | Persistent storage that survives container deletion | An external hard drive |
| Network | A virtual connection between containers | An ethernet switch connecting devices |
| Dockerfile | A text file with instructions for building an image | The recipe card itself |
| Compose | A tool for defining and running multi-container applications from a single file | A conductor orchestrating multiple musicians |
Containers vs Virtual Machines
If you have used VMs before, you will notice containers feel much lighter. Here is why.
A virtual machine runs a full guest operating system on top of a hypervisor. A container shares the host kernel and only packages the application layer.
flowchart BT
subgraph VM ["Virtual Machine"]
APP1[App] --> LIB1[Libs] --> OS[Guest OS] --> HYP[Hypervisor] --> HW1[Infrastructure]
end
subgraph CONT ["Docker Container"]
APP2[App] --> LIB2[Libs] --> ENG[Docker Engine] --> HW2["Host OS + Infrastructure"]
end
| Feature | Virtual Machines | Containers |
|---|---|---|
| Isolation | Hardware-level (heavy) | OS-level (lightweight) |
| Startup Time | Minutes | Seconds |
| Size | Gigabytes | Megabytes |
| Performance | Near-native | Native |
Both tools have their place. Use containers for application packaging and microservices. Use VMs when you need full OS isolation or must run a different kernel.
Is Docker Free?
Yes — the core technology is free and open source.
| Component | License | Cost |
|---|---|---|
| Docker Engine (Linux) | Apache 2.0 | Free |
| Docker CLI | Apache 2.0 | Free |
| Docker Desktop (Mac/Windows) | Proprietary | Free for personal, education, and small business use. Paid subscription for larger organizations. |
On Linux servers, you use Docker Engine directly. It is completely free and unaffected by the Docker Desktop licensing changes.
What You Will Learn in This Module
| Lesson | What It Covers |
|---|---|
| What Is Docker and Why It Matters | Core concepts, the image/container model, and a hands-on walkthrough |
| History of Docker | How Docker evolved from a PaaS side project to an industry standard |
| Licensing and Governance | What is free vs paid, who controls the ecosystem, and what your team needs to track |
| Docker Popularity and Industry Adoption | Market adoption, use cases, and where Docker fits in the modern stack |