{ "id": "docker-image-vs-container-mcq", "title": "Image vs. Container — The Distinction That Confuses Everyone at First", "category": "Containers", "isolation_type": "shared_namespace", "difficulty": "Easy", "type": "mcq", "weight": 3, "description": "## Image vs. Container — The Distinction That Confuses Everyone at First\n\nYou run `docker run nginx:alpine` three separate times without removing anything in between. How many containers now exist, and how many images?", "options": [ { "id": "a", "text": "3 containers, 3 images — each run creates its own independent image" }, { "id": "b", "text": "3 containers, 1 image — the image is the packaged artifact pulled once; each `run` creates a new, independent RUNNING INSTANCE from it" }, { "id": "c", "text": "1 container, 1 image — running the same image twice just reuses the same container" }, { "id": "d", "text": "1 container, 3 images — Docker versions the image automatically on each run" } ], "correct_option": "b", "explanation": "An image is packaged, read-only artifact — pulling `nginx:alpine` downloads it exactly once. A container is a RUNNING INSTANCE of an image; running the same image multiple times creates multiple independent containers (with their own writable layer, network identity, and lifecycle), all sharing the same underlying image.", "hints": [], "setup_commands": [], "default_namespace": "default", "teardown_commands": [] }