Docker module
Foundations · Module 02
Docker and Compose
A beginner path from “what is a container?” to images, volumes, ports, and a Compose data stack. Practice only on your machine.
Beginner14 lessons~7 hours plus a demo
Data tools ship as containers: Postgres, Spark, Airflow, notebooks. A Compose file is how a team says “this stack, these ports, this volume.” This module teaches that language after Linux — still on your machine, still with you typing every command.
You will install Docker, run images, persist files, publish ports, then describe a small stack in Compose. The site never runs containers for you.
Start here
Finish Linux Getting Started first so you have a terminal and~/dcubes. Then do this module’s Getting Started even if Docker Desktop is already installed — we create~/dcubes/docker-lab and check docker compose.
On-ramp
ReadyYour Docker practice environment
Install Docker and Compose on Windows, macOS, or Linux. This site never runs containers — you will.
45 min
Lesson 1
ReadyWhy Docker for Data Engineering
Where containers show up in data work, and which Docker skills you will use every week.
20 min
Lesson 2
ReadyImages, containers, and Compose
The mental model — image, container, Dockerfile, and Compose file — before you type docker run.
25 min
Lesson 3
ReadyRun a container
docker run, flags, Alpine, and the difference between a command that exits and a command that stays up.
30 min
Lesson 4
ReadyContainer lifecycle
Name a container, read logs, stop it, start it, and remove it without pruning the world.
25 min
Lesson 5
ReadyLook inside
docker exec for a shell in a running container, and inspect for the JSON facts.
25 min
Lesson 6
ReadyImages and tags
Docker Hub, docker pull, tags versus latest, and how to see what you already downloaded.
25 min
Lesson 7
ReadyWrite a Dockerfile
FROM, COPY, RUN, CMD, docker build, and why you do not bake secrets into an image.
35 min
Lesson 8
ReadyPersist data
Bind mounts versus named volumes, and why warehouse files must live outside the container layer.
30 min
Lesson 9
ReadyPublish ports
Container ports versus host ports, -p, and why Postgres is unreachable until you publish it.
25 min
Lesson 10
ReadyEnvironment in containers
-e, --env-file, and why database passwords stay out of Dockerfiles and git.
25 min
Lesson 11
ReadyCompose up
A compose.yaml, services, docker compose up and down — one file instead of a pile of flags.
35 min
Lesson 12
ReadyCompose a data stack
Postgres plus a one-shot job, healthchecks, depends_on, and a named volume for the data directory.
40 min
Lesson 13
ReadyDebug and cleanup
Read Compose logs, exec into a service, check Docker disk use, and prune without deleting your warehouse volume by accident.
25 min