DockerPlay
1
Chapter 018 mins • beginner

What is Docker?

Containers vs Virtual Machines & Core Architecture

What You Will Master:

Understand the difference between Virtual Machines and Containers
Learn the roles of Docker CLI, Docker Daemon (Engine), and Registries
Understand why "it works on my machine" is solved by containerization

The Problem: "It Works on My Machine"

Before Docker, shipping software meant dealing with environment discrepancies: different OS versions, conflicting library versions, missing environment variables, and varying system dependencies. Docker solves this by bundling your application code, system libraries, configuration, and runtime environment into an immutable, portable artifact called an **Image**. Every container instance spawned from that image runs identically on developer laptops, CI/CD pipelines, and cloud production servers.

Containers vs. Virtual Machines

### Virtual Machines (Hardware-level Virtualization) * Each VM packages a complete **Guest Operating System** (GBs in size). * Relies on a Hypervisor layer on top of hardware. * Slow boot times (minutes) and heavy CPU/RAM overhead. ### Containers (OS-level Virtualization) * Containers share the **Host OS Linux Kernel**. * Each container is an isolated userspace process. * Lightweight (MBs in size), sub-second startup times, near-native performance.

Docker Engine Anatomy

The Docker system consists of three main components: 1. **Docker CLI (`docker`)**: The command-line client you interact with. 2. **Docker Daemon (`dockerd`)**: The background engine managing containers, images, virtual networks, and storage volumes. 3. **Container Registry (Docker Hub)**: A cloud repository for sharing and downloading container images.
Interactive Lab

First Contact with Docker CLI

Run your very first Docker command in the terminal to inspect available commands and check Docker images.

0/1 Steps Done
Step 1: Inspect local images using the Docker CLI

Type `docker images` into the terminal and press Enter.

Chapter Knowledge Check

Take the interactive MCQ test to unlock bonus XP

Sponsor & Resources