Module · 5 lessons

Docker Fundamentals

Write your first Dockerfile, understand the build cache, run a local image registry, and debug a container that crashes.

At a glance

Level
Beginner
Lessons
5 lessons
Time to complete
1 week
Cost
Free forever · no sign-up

Welcome to Docker Fundamentals, the second module of Docker & Kubernetes for Data Engineering. Module 1 got you running containers built by other people — nginx, Postgres, Python. This module is about building your own. CityFlow’s team doesn’t just consume images; it ships them, and that starts with a file you write yourself.

You’ll begin with the four instructions every Dockerfile is built from — FROM, RUN, COPY, CMD — and build a small, original image from scratch, then use docker history to see, layer by layer, exactly what each instruction produced. From there you’ll run the same build twice with its instructions reordered, and measure a real, sometimes dramatic, difference in build time depending on whether your Dockerfile makes Docker’s build cache work for you or against you. You’ll stand up a real local image registry — the same mechanism Docker Hub uses at public scale — and push, remove, and pull an image through it to prove an image really is portable. And you’ll deliberately build a container that crashes on a real bug, then diagnose exactly why using docker logs, docker exec, and docker inspect, the way you’d actually debug one in production.

The module closes with a guided project that ties all four skills together: one Dockerfile, two tags, a push through your local registry, and a pull that proves the image runs identically no matter where it came from.

Start with Lesson 1, and write your first Dockerfile.

Lessons in this module

Achievement

Complete all 5 lessons to finish the Docker Fundamentals module.

Start module
Sponsor

Keep DATATWEETS free. Help fund practical data, AI, and engineering lessons for learners worldwide.

Buy Me a Coffee at ko-fi.com