What is an Image? (The Blueprint Analogy)

LEVEL 0

The Problem

You want to run a Python web application in a container. You type docker run python-app and Docker says: “I don’t know what python-app is.”

Fair enough. Docker needs to know what should be inside that container. What version of Python? What libraries? What files? What configuration?

You can’t just say “run a container.” You need to tell Docker exactly what that container should contain.

But here’s the thing — you don’t want to specify all of that every single time you run a container. Imagine typing out “use Python 3.11, install Flask, install requests, copy these 50 files, set these 10 environment variables” every time you want to start your app.

You need a way to define all of that once, save it, and then say “run that thing I defined.”

That saved definition is an image.