✦ For everyone, free.

Practical knowledge for real and everyday life

Home

3.1 Image Concepts

A focused guide to Image Concepts, connecting core concepts with practical Docker and container operations.

Image concepts cover the small set of foundational ideas — layers, tags, digests, and the distinction between an image and a container — that together explain how Docker images are structured and how they relate to the running containers built from them.

Layers as Building Blocks

An image is composed of layers, each representing a discrete filesystem change, stacked in order to form the image's complete filesystem.

docker history myapp:1.0
Tags as Human-Readable Pointers

A tag is a mutable, human-readable name pointing to a specific image, useful for referring to images without needing to remember their full content digest, but not itself a permanent or unique identifier.

docker tag myapp:1.0 myapp:latest
docker tag myapp:1.0 myapp:stable

The same underlying image can have multiple tags pointing at it simultaneously, and a tag can later be reassigned to point at a different image entirely.

Digests as Immutable Identity

A digest is a cryptographic hash of an image's content, providing a permanent, unambiguous reference to one exact set of layers and configuration — unlike a tag, a digest cannot be reassigned to refer to different content.

docker inspect myapp:1.0 --format '{{.Id}}'
Images vs. Containers

An image is a static, read-only template; a container is a running (or stopped) instance created from that template, with its own writable layer and runtime state. The same image can be the basis for many independent containers simultaneously.

docker run -d --name app1 myapp:1.0
docker run -d --name app2 myapp:1.0

Both containers share the same underlying image but are entirely independent running instances, each with its own writable layer and lifecycle.

Why These Concepts Matter Together

Understanding layers explains how images are built and why they can be efficiently shared and cached; understanding tags and digests explains how to refer to images precisely; and understanding the image-versus-container distinction is what makes the rest of Docker's behavior — starting, stopping, removing containers without affecting the underlying image — predictable rather than confusing.

Content in this section