Containers package code and all its dependencies into a single unit. This solves the classic problem: "It works on my machine, but breaks in production."
Includes a full Operating System. Slow to boot. Uses lots of RAM.
Shares the Host OS Kernel. Boots in milliseconds. Very lightweight.
Goal: Deploy your Python App to Production.
Constraint: Your App needs Python 3.9. The Server is old and has Python 3.6.
The recipe. A text file containing instructions to build the image (e.g., "Install Python", "Copy files").
The blueprint (Cookie Cutter). It is a read-only template built from the Dockerfile. You store this in a Registry.
The actual cookie. It is a runnable instance of an Image. You can run 100 containers from 1 image.
Docker is great for running one container. But what if you have 1,000?
What if one crashes and needs restarting? What if you need to upgrade them without downtime?
That is what Kubernetes does. It manages (orchestrates) your fleet of containers.