Skip to main content

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.

Why Start Here?

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

TermWhat It IsAnalogy
ImageA read-only template containing your application and its dependenciesA recipe — you follow it to make the same dish every time
ContainerA running instance of an image, isolated from the host and other containersA dish made from the recipe — disposable, reproducible
VolumePersistent storage that survives container deletionAn external hard drive
NetworkA virtual connection between containersAn ethernet switch connecting devices
DockerfileA text file with instructions for building an imageThe recipe card itself
ComposeA tool for defining and running multi-container applications from a single fileA 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
FeatureVirtual MachinesContainers
IsolationHardware-level (heavy)OS-level (lightweight)
Startup TimeMinutesSeconds
SizeGigabytesMegabytes
PerformanceNear-nativeNative

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.

ComponentLicenseCost
Docker Engine (Linux)Apache 2.0Free
Docker CLIApache 2.0Free
Docker Desktop (Mac/Windows)ProprietaryFree for personal, education, and small business use. Paid subscription for larger organizations.
Production Note

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

LessonWhat It Covers
What Is Docker and Why It MattersCore concepts, the image/container model, and a hands-on walkthrough
History of DockerHow Docker evolved from a PaaS side project to an industry standard
Licensing and GovernanceWhat is free vs paid, who controls the ecosystem, and what your team needs to track
Docker Popularity and Industry AdoptionMarket adoption, use cases, and where Docker fits in the modern stack