← TEK2 videos

Image vs Container — the recipe vs the meal

Week 01 · 5 min

Download MP4

What this covers

Images are recipes (immutable files on disk); containers are meals (running instances). Walk through `docker run` — twice — and see why the image never changes.

  1. The recipe / meal analogy
  2. docker run hello-world — one image, one container
  3. Two containers from one image — writes don't cross
  4. The image never changes — a third run starts fresh
  5. Programmer's analogy: class vs instance
  6. A common mistake: run vs exec
  7. Cleanup: docker ps -a, docker rm, docker rmi