Skip to content

Lessons

  1. 1.Why containers: from bare metal to VMs to containers

    Not started

    Follow the problems that led to containers: one app per server, mismatched environments, heavy virtual machines.

    Getting started · 6 steps

  2. 2.Docker architecture: CLI, daemon, API and registries

    Not started

    See what the docker command really is, how it talks to dockerd, and where images come from.

    Getting started · 6 steps

  3. 3.Install Docker and verify it works

    Not started

    See where the engine runs on each system, then watch docker version, docker info and hello-world confirm a working setup.

    Getting started · 6 steps

  4. 4.What is a container, really?

    Not started

    See that a container is an ordinary Linux process, wrapped in namespaces and a cgroup.

    Basics · 6 steps

  5. 5.What happens when you run docker run hello-world

    Not started

    Follow one command from the CLI, through the Docker socket and registry, to a container that prints and exits.

    Basics · 5 steps

  6. 6.A container's life: create, start, pause, stop, remove

    Not started

    Follow one container through its states and see which API call changes which field.

    Basics · 6 steps

  7. 7.docker exec and docker logs

    Not started

    See how a second process joins a running container, and where its output and logs come from.

    Basics · 6 steps

  8. 8.Detached and interactive mode: -d, -i and -t

    Not started

    See what -d, -i and -t change in the create request, how a terminal is wired to a container, and how to leave without stopping it.

    Basics · 6 steps

  9. 9.Cleaning up: rm, rmi and prune

    Not started

    See what docker ps, rm, rmi and the prune commands ask dockerd to delete, and what system prune leaves alone.

    Basics · 6 steps

  10. 10.What docker pull downloads

    Not started

    Follow a pull from the CLI to the registry: token, manifest, layer blobs, and the files left on disk.

    Images · 6 steps

  11. 11.Dockerfile instructions: FROM, WORKDIR, COPY, RUN, EXPOSE, USER

    Not started

    Read one Dockerfile line by line and see what each instruction changes: a layer, or only the image's config.

    Images · 6 steps

  12. 12.How docker build turns a Dockerfile into layers

    Not started

    Watch each Dockerfile instruction run, become a layer or only metadata, and hit or miss the cache.

    Images · 6 steps

  13. 13.CMD vs ENTRYPOINT

    Not started

    See how CMD and ENTRYPOINT combine into the container's command, and how docker run arguments and --entrypoint change it.

    Images · 6 steps

  14. 14.ARG vs ENV: build-time and run-time variables

    Not started

    See where ARG and ENV values live, which one reaches a running container, and why neither is a safe place for secrets.

    Images · 6 steps

  15. 15.Multi-stage builds: compile big, ship small

    Not started

    Build a Go program in one stage and copy only the binary into a small final image.

    Images · 6 steps

  16. 16.overlay2: layers and copy-on-write

    Not started

    See how a container's filesystem is read-only image layers plus one writable layer, and what a write or delete does.

    Images · 6 steps

  17. 17.Tag and push an image to a registry

    Not started

    See that a tag is only a name, then follow the push: blob checks, uploads and the manifest.

    Images · 6 steps

  18. 18.Namespaces: what a container can see

    Not started

    Look at the pid, mount, uts and network namespaces one by one, and see what changes when a container shares the host's.

    Under the hood · 6 steps

  19. 19.cgroups: limits, and why exit code 137 happens

    Not started

    See memory and CPU limits written into a cgroup, then follow an out-of-memory kill to exit code 137.

    Under the hood · 6 steps

  20. 20.dockerd, containerd, the shim and runc

    Not started

    Follow a start request down the runtime stack and see which part stays alive afterwards.

    Under the hood · 6 steps

  21. 21.Signals and PID 1: why docker stop takes 10 seconds

    Not started

    See what docker stop sends, why PID 1 can ignore it, and how exec form and --init fix it.

    Under the hood · 6 steps

  22. 22.Bridges and veth pairs: how containers share a network

    Not started

    See a Linux bridge created for shop-net, containers plugged in with veth pairs, and one packet crossing from web to api.

    Networking · 6 steps

  23. 23.How -p 8080:80 reaches your container

    Not started

    Watch Docker add a NAT rule, then follow one TCP packet from the laptop to the web container and back.

    Networking · 6 steps

  24. 24.Container DNS: how web finds api by name

    Not started

    Follow a name lookup to Docker's embedded DNS server and see what happens on the default bridge instead.

    Networking · 6 steps

  25. 25.Network modes: bridge, none and host

    Not started

    Compare what a container sees with --network bridge, none and host, and what -p does in each.

    Networking · 6 steps

  26. 26.Overlay networks: VXLAN between two hosts

    Not started

    Follow one TCP packet from a container on host A to a container on host B, wrapped in VXLAN.

    Networking · 6 steps

  27. 27.Volumes vs bind mounts

    Not started

    Compare a Docker-managed volume with a host directory mounted into a container, and see what each one hides or fills.

    Storage · 6 steps

  28. 28.Why data in a volume survives docker rm

    Not started

    Write one file to the container's layer and one to a volume, remove the container, and see which one is left.

    Storage · 6 steps

  29. 29.Back up and restore a volume

    Not started

    Use a throwaway container with two mounts to tar a volume to the host, then restore it into a new volume.

    Storage · 6 steps

  30. 30.What docker compose up does

    Not started

    See that Compose is a client: it turns a YAML file into the same Engine API calls you could make by hand.

    Compose · 6 steps

  31. 31.depends_on and healthchecks

    Not started

    See what a healthcheck runs, how its status changes, and why depends_on needs service_healthy to wait for a ready database.

    Compose · 6 steps

  32. 32.Environment variables and secrets in Compose

    Not started

    Follow a variable from your shell into a container, see who can read it, and compare it with a secrets file.

    Compose · 6 steps

  33. 33.Scaling a service: three api containers

    Not started

    Run three copies of api, see how DNS finds them, and learn what stops a service from scaling.

    Compose · 6 steps

  34. 34.Docker Compose Watch: live updates while you code

    Not started

    See how Compose watches your files and then syncs them into the container, restarts it, or rebuilds the image.

    Compose · 6 steps

  35. 35.Restart policies, and what unhealthy does not do

    Not started

    See how dockerd restarts a crashing container, when it gives up, and why a failing healthcheck alone restarts nothing.

    Production · 6 steps

  36. 36.Resource limits: CPU, memory, swap and processes

    Not started

    Map each limit flag to the cgroup file the kernel enforces it with, and change limits on a running container.

    Production · 6 steps

  37. 37.Hardening a container: user, read-only root, capabilities

    Not started

    Start from a default container and add one control per step, checking each from inside.

    Production · 6 steps

  38. 38.Small images and vulnerability scanning

    Not started

    See what makes an image big, why deleting files in a later layer does not shrink it, and how a scanner reads an image.

    Production · 6 steps

  39. 39.Logging drivers and log rotation

    Not started

    Follow a log line from the container to a driver, and see how rotation and the host-wide default are set.

    Production · 6 steps

  40. 40.From Compose to Swarm to Kubernetes

    Not started

    See which ideas carry over when one host becomes a cluster, and that the container stack underneath stays the same.

    Production · 6 steps

  41. 41.A CI/CD pipeline with Docker

    Not started

    Follow one commit through build, test, scan, push and deploy, and see why images are tagged with the commit id.

    Production · 6 steps