Everything in container work hangs on one distinction, and experienced people blur it daily. An image is a packaged, versioned, distributable bundle: your application's code, its runtime, its libraries, and its default configuration, assembled into layers and identified by a name, a tag, and, underneath both, a content digest that changes whenever the contents change. An image does nothing. It sits in a registry or on a host the way a compiled program sits on a disk.

A container is what happens when the runtime starts a process from an image: a living process, with memory, a network identity, a writable layer on top of the image's read-only layers, and a lifespan. One image can start ten containers. Ten containers started from one image share everything the image contains, and diverge in everything that happens after they start.

Nearly every expensive mistake is a line-crossing mistake

A fix applied inside a running container — a library upgraded by hand, a file edited in place — lives only in that container's writable layer. Stop the container, remove it, or let it crash and be replaced, and the fix vanishes, because the image it was started from never contained it. The durable fix is always the same move: change the source, rebuild the image, ship the new image, and start a new container from it.

Practitioners call the opposite habit — nursing a long-lived container by hand — running a pet. Containers are built to be cattle: identical, replaceable, and boring. The moment one becomes unique, you have lost the very property you adopted containers to gain.

The writable layer deserves its own respect. When a container runs, the changes it makes to its filesystem are recorded in that thin layer above the image, and the layer is tied to that container's identity. It is the wrong place for anything you value: uploaded files, database data, accumulated logs you need later. Hold the rule in its simplest form: if losing it would hurt, it does not live in a container's writable layer.

Identity sits on both sides of the line, differently

An image's tag — say, dispatch-api:2.4.1 — is a human label. Its digest is a fingerprint of exact content. Two different builds can, through carelessness, share a tag; they cannot share a digest unless their contents are identical. That is why mature teams talk about images by digest when accuracy matters. "Production is running the image whose digest begins…" is a verifiable claim. "Production is running 2.4.1" is only as true as the team's tagging discipline.

A container likewise has its own identity, separate from the image it came from: its own ID, name, state — created, running, paused, exited — exit code, and log stream. When you inspect a problem, half of diagnosis is asking the right object the right question. Questions about what the software is belong to the image. Questions about what happened at 2 a.m. belong to a container.

The line governs how you think about change

Images change by being rebuilt and replaced. They are immutable in practice: you do not edit an image, you publish a new one. Containers change by being stopped and replaced with containers from a newer image. Teams that internalize this stop fearing deployments, because a deployment is a swap of instances, and a rollback is a swap back.

Teams that do not internalize it accumulate snowflake containers, mystery states, and incidents whose first hour is spent discovering what is actually running. That discovery problem always starts at the same place: name the artifact, name the instance, and never let one impersonate the other.

One further habit separates practitioners who merely use this distinction from those who think with it: they keep two inventories, not one. The first is an inventory of artifacts — which images exist, what each contains, where each was built from, and which of them are still entitled to run. The second is an inventory of instances — which containers are running right now, from which artifacts, in what state, and under whose ownership.

Most operational confusion is a failure to say which inventory a question belongs to. A question about disk space may belong to either. A question about a defect belongs to the artifact until proven otherwise. A question about last night belongs to the instances and their records. When a team learns to route every question to its inventory before answering it, meetings shorten and incidents clarify — and the line stops being a definition and becomes a reflex, which is where it has to live, because incidents do not pause while you look definitions up.

This is also why the familiar comparison fails. A container is not basically a small virtual machine that you maintain for as long as it lasts. It is a process started from a packaged image, sharing the host's kernel, and its whole economic point is replaceability. Maintain the image and the definition that builds it; replace containers freely. The day you find yourself protecting a particular container from being stopped, you have rebuilt a pet server inside a tool designed to end pet servers.

Experience it, don’t just read about it

The artifact and the instance — an image is packaged and immutable, a container is a replaceable process started from it is Concept 1 of Docker and Containers in Practice: Build, Ship and Run Containers Yourself (Course No. 456), from Cognosco Learning, a learning company powered by AI. The course builds the full practice of building, shipping, and running containers beyond this distinction — Layers and the Build Cache — Why Instruction Order Is Money, Tags That Mean Something — Versioning Discipline for Images, and Running a Container Like You Own It — Lifecycle, Logs, and Clean Shutdown — each worked through with an Agentic Socratic AI coach, one learner at a time. Try a Free Preview at cognoscolearning.com.

Try a Free PreviewAll Signature CoursesThe Corporate License

Navigate your own course.

← All Insights

© 2026 Cognosco Learning. All rights reserved.