Learn Docker for data work: build pipeline images, persist data with volumes, connect services, and run Postgres, Kafka, and Airflow with Compose.
You have just joined acme-shop's data team.
Three terms get used constantly in Docker and confused just as often. Getting them right now makes everything after this module click faster.
Docker Desktop bundles the Docker engine, the command-line client, Docker Compose, and a management GUI in one install.
Writing a Dockerfile for a Data Pipeline Script Say you have a small Python script that reads a CSV of acme-shop orders and writes a summary.
Managing Images Managing Containers 💡 Tip: Add --rm to docker run while testing (docker run --rm acme-order-pipeline:v1).
Data written to a container's own writable layer survives docker stop and docker restart, because stopping a container does not touch its filesystem.
You have just joined acme-shop's data team.
Three terms get used constantly in Docker and confused just as often.
Docker Desktop bundles the Docker engine, the command-line client, Docker Compose, and a management GUI in one install.
Writing a Dockerfile for a Data Pipeline Script Say you have a small Python script that reads a CSV of acme-shop orders...
Managing Images Managing Containers 💡 Tip: Add --rm to docker run while testing (docker run --rm...
Data written to a container's own writable layer survives docker stop and docker restart, because stopping a container...
A pipeline that connects to Postgres with the host, database, user, and password written directly in the Python code...
A single container is rarely enough. A real pipeline needs a pipeline container to talk to Postgres, or Spark workers...
Running several docker run commands with matching network, volume, and port flags every time you want your stack is...
Here is a Compose file with three common mistakes baked in. Find all three before you read on.
Pin Your Base Image Version A pipeline that works today on python:latest can silently break next month when that tag...
Cost: free, everything runs on your laptop.
Command Reference Common Mistakes Forgetting a .dockerignore file lets Docker copy .env files, .git history, and large...
Roles that use the skills in this module.
Data Engineer
Platform Engineer
DevOps Engineer
Site Reliability Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetAn image is a read-only template that defines the OS layer, packages, and code. A container is a running instance of an image. You can start many containers from one image, and each runs independently.
A container's own writable layer is deleted with the container. Store data you care about in a volume, which lives independently. Stopping a container does not delete its data, but removing it does.
Put them on the same network and use the service or container name as the hostname. Docker Compose does this automatically for every service in one file, so a pipeline can reach Postgres at postgres:5432.
Only when you deliberately want to delete named volumes and start from a clean slate. A plain docker compose down stops and removes the containers but keeps your volumes, so database data survives.