█
LastWrite
  • > Curriculum
  • > Pricing
  • > For Educators
  • > About
  • > Contact
Log InGet Started

Questions, concerns, bug reports, or suggestions? We read every message, write to us at [email protected].

More ways to reach us →
LastWrite

Structured computer science lessons for aspiring developers and security professionals.

[email protected]

(201) 785-7951

Mon–Fri, 9 AM–5 PM EST

Learn

  • Curriculum
  • Pricing

Company

  • About
  • For Educators & Schools
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
© 2026 LastWrite. All rights reserved.
Curriculum/DevOps and Infrastructure/Docker and Containerization/What Containers Are and Why
30 minBeginner

What Containers Are and Why

After this lesson, you will be able to: Explain what containers are, the problem they solve, and how Docker compares to VMs.

Containers ship the entire runtime your app needs, OS libs, dependencies, the binary, as one immutable image. Same image runs identically on your laptop, CI, staging, and prod. That's the deploy story modern engineering is built on.

This is a free introductory lesson. No purchase required.

The problem containers solve

'Works on my machine.' Software depends on a specific Python version, a specific OpenSSL, a specific environment variable. Every server is slightly different; every deploy risks a mismatch. Containers package the app + every dependency into a single immutable image. The same image runs everywhere; the host only provides the kernel. Bonus: containers boot in seconds vs minutes for VMs; you can run dozens on one machine.

VMs vs containers

VM: each instance has its own full OS (kernel + userland). Big, slow to start, strong isolation. Hypervisor (VirtualBox, VMware, KVM) emulates hardware. Container: shares the host kernel; only userland is isolated. Tiny (often <50MB), starts in milliseconds, weaker isolation. Docker engine manages them. Use VMs for hard-multi-tenant isolation (running untrusted code). Use containers for everything else.

💡 What Docker actually is

Docker = the daemon that builds and runs containers + the CLI to talk to it + the image format (OCI) + Docker Hub (registry of public images). Under the hood: Linux kernel features (namespaces, cgroups) do the heavy lifting. Docker is the friendly wrapper that made them mainstream in 2013.

Install Docker (any OS)

Pick the path for your laptop. On servers, install via package manager.

  1. 1

    macOS / Windows: install Docker Desktop from docker.com (includes Docker engine + CLI + GUI)

  2. 2

    Ubuntu: follow docs.docker.com/engine/install/ubuntu (apt with their repo)

  3. 3

    Fedora / Rocky: docs.docker.com/engine/install/fedora

  4. 4

    After install, verify: docker version ; docker run hello-world

  5. 5

    If 'permission denied': sudo usermod -aG docker $USER, then log out + back in

Why this matters for your career

Every modern web stack ships in containers. Every DevOps / SRE / Platform job description names Docker. Kubernetes (the next sub-track) is orchestration on top of containers. AWS ECS / Fargate are container services. CI/CD pipelines build container images. If you skip this sub-track, the rest of DevOps doesn't make sense.

Quick Check

Why is a container faster to start than a VM?

Pick the technical reason.

Back to Docker and Containerization
Docker Fundamentals→