What Docker is
Shipping containers, for software
Before shipping containers, every cargo was loaded differently: sacks, barrels, crates. Then everyone agreed on one box size, and any ship, train or truck could carry any box. Docker does the same for software. A container is a standard box holding an app plus everything it needs to run. Any computer with Docker can run any container.
The problem it solves
Without containers, getting an app running means installing the right version of the language, the right packages, a database, and the right settings — on every developer's laptop and every server. Something is always slightly different: "it works on my computer!". With Docker you describe all of that once, in a file, and every computer runs exactly the same thing.
Images and containers
| Word | Means | Like |
|---|---|---|
| Image | A read-only package: the app, its files, and the operating-system bits it needs | A recipe, or a class in programming |
| Container | A running copy of an image, with its own files, processes and network | A meal made from the recipe; an object made from the class |
| Dockerfile | A text file with the steps to build an image | Writing the recipe down |
| Registry | A place to download and share images, like Docker Hub | A recipe library |
You can start many containers from one image — say, three copies of a web app behind a load balancer — and each is separate.
Containers aren't virtual machines
A virtual machine (VM) pretends to be a whole computer and runs a complete operating system of its own. A container shares the host's operating system kernel and only packages the app and its files. So containers:
- Start in about a second (a VM takes a minute)
- Are small — tens or hundreds of megabytes, not gigabytes
- Can run dozens at once on a laptop
Containers are a Linux feature. On Windows and Mac, Docker Desktop quietly runs one small Linux VM and puts your containers in it — which is why the images you'll use are Linux ones.
Where you'll meet Docker
- Developers run databases and other services in containers instead of installing them, and ship their apps as images
- Testers start a fresh copy of the app for every test run
- IT support and cloud roles run and update containers on servers (and later, with Kubernetes, thousands of them)
- Hosting services like Railway, Render, Fly.io, Google Cloud Run and AWS deploy straight from a Dockerfile
What you'll build
You'll containerise Shift Swap, a web app where staff at a café post shifts they can't make and teammates take them. It's a Python (Flask) app with logins, a database and a small API — a realistic small app. By Module 5, it runs with a PostgreSQL database in a second container, started with one command. The download has the app and the finished files for each module.
Try it
- Think of an app you use at work, school or home. What would need to be installed for it to run on a new computer?
- Download the course files (below) — you'll use them from Module 2.
Downloads
1 file to download once you enrol.
