Course 01 · Docker · v1
Docker, from first principles.
Start with what a container really is. Finish by shipping a four-service app to a real server. Every lesson has commands to run, a quiz to check yourself, and the interview questions it prepares you for.
You should know
Basic terminal use: cd, ls, running a command. Some idea of what a web server is.
You'll need
A laptop that can run Docker Desktop or Docker Engine, and about 10 GB of free disk.
You'll leave with
A production-ready image, a Compose stack, a CI pipeline and a deployed app on your GitHub.
Foundations
What a container actually is, and why it beat the alternatives.
Images
Write Dockerfiles that build fast, stay small and cache well.
Running containers
Lifecycle, ports, config, logs and limits.
Data
Where data lives when containers come and go.
Networking
How containers find and talk to each other.
Compose
One file, one command, the whole stack.
Production
Secure, reproducible images and a pipeline that ships them.
One app, built a step at a time as you learn. A Node API with Postgres, Redis and Nginx. Every step is a git tag in the companion repo, so you can check out any point and compare.
Containerise the API
git checkout docker-step-01A multi-stage Dockerfile for the notes API, built and pushed to a registry. · after module 02
Configure and health-check it
git checkout docker-step-02Env-based config, a healthcheck and sensible limits. · after module 03
Persist Postgres
git checkout docker-step-03Notes move to Postgres 18 on a named volume, with a tested dump and restore. · after module 04
Wire the services together
git checkout docker-step-04Nginx in front, a Redis cache, and separate public and private networks. · after module 05
One-command dev environment
git checkout docker-step-05docker compose up --watch: healthy startup order, seeded data and hot reload. · after module 06
Ship from CI
git checkout docker-step-06GitHub Actions builds, scans with Trivy and publishes amd64 + arm64 images to GHCR. · after module 07
Deploy to a VPS
git checkout docker-step-07A hardened production compose file, secrets from files, deploys and rollbacks by tag. · after module 07
What's the difference between an image and a container?
What is a Dockerfile, and which instructions do you use most?
Will you lose data when a container exits? How do you persist data?
What is Docker Compose, and how is it different from a Dockerfile?
What's the difference between a container and a virtual machine?
The most-asked questions across 11 widely read Docker interview guides, with model answers.
Open all 54 questions →