امنیت، هویت، استقرار و تاب‌آوری · فصل ۴ — Linux/Windows، Container، DNS، CDN و Storage · 96

Docker/OCI: Image, Layer, Volume, Network, Digest

Build an OCI-aware container model that separates image manifest/config/layers and digest identity from the running container, writable layer, volume/bind storage and network attachment, then prove those boundaries with a small offline fixture. می‌تواند برای «Docker/OCI: Image, Layer, Volume, Network, Digest» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

Docker/OCI: Image, Layer, Volume, Network, Digest — fa-IR

Lesson summary

Build an OCI-aware container model that separates image manifest/config/layers and digest identity from the running container, writable layer, volume/bind storage and network attachment, then prove those boundaries with a small offline fixture.

می‌تواند برای «Docker/OCI: Image, Layer, Volume, Network, Digest» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

This lesson produces

می‌تواند برای «Docker/OCI: Image, Layer, Volume, Network, Digest» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

Who it is for

Foundation

Worked runtime map, explicit evidence table, local fixture and one guided failure probe.

Repair

Reduce to one broken runtime/configuration assumption, observe it, repair it, then restore the full case.

Experienced

Compress introductory syntax; require independent diagnosis, negative evidence and bounded recovery decision.

Prerequisites

1. The problem: one “image name” hides several identities

Operationally, app:latest, a content digest, an image manifest, a running container, and files visible inside that container are often collapsed into one idea. That shortcut makes rollback, persistence analysis, and diagnosis unreliable.

The owned artifact is Container Image Runtime Boundary Record v1. It keeps tag/reference, digest, manifest/config/layers, platform, container identity, writable state, mounts, network attachment, and replacement evidence separate.

2. An OCI image is a content-oriented structure

The OCI Image Specification models an image with a manifest, configuration, filesystem layers, and optionally an image index. That interoperable image structure is not the same thing as a running container instance.

Record descriptor/manifest/config/layer evidence separately from runtime observations. If you only have a convenient CLI summary, label any extra conclusion as inference rather than silently promoting it to fact.

3. Descriptors and digests establish a content-identity boundary

An OCI descriptor carries information about referenced content, including media type, size, and digest. The digest participates in verifying referenced content and must remain distinct from a human-readable tag.

A tag is convenient naming. A digest is content-addressed identity evidence. They are useful together, but they do not have the same semantics.

4. A tag is not a digest

A tag or reference is a name/pointer. A digest identifies referenced content by hash. Retagging the same local content changes the human reference without necessarily changing the content digest.

The lab contains a synthetic retag case. The correct conclusion is that tag text changed while content identity remained the same, not that “a new image was automatically created.”

5. Manifest, config, and filesystem layers have distinct roles

An image manifest references configuration and layer descriptors. The config carries image/runtime-oriented configuration metadata; layers represent filesystem changes.

Do not merge manifest digest, config digest, and layer evidence into one field. Each boundary answers a different operational question.

6. An image layer is not the running container writable layer

Docker describes images as immutable and layer-based. Runtime writes go into a writable layer associated with the container rather than mutating the immutable image layers automatically.

If a file is created inside a container and that container is removed, recreating a new container from the same image does not make the old writable-layer state part of the image.

7. Named-volume persistence is a separate boundary

Volumes are designed to keep data outside the lifecycle of an individual container. Replacing a container does not inherently remove a named volume.

The lab includes a replacement case where volume-backed data persists. That proves a storage-boundary observation, not universal application correctness.

8. Bind mounts have different host coupling

A bind mount exposes a host path inside the container. Its lifecycle and coupling differ from a Docker-managed volume.

Record mount type and source explicitly. Seeing a file inside the container is insufficient by itself to prove whether the source is a bind mount, named volume, or writable container layer.

9. Do not guess image index or platform selection

An OCI image index can reference multiple manifests, often for different platforms. A common tag can therefore resolve to a different manifest for a different platform.

The lab includes a synthetic platform variant. If selected-platform or manifest evidence is absent, leave that conclusion OPEN rather than inferring it from the image name.

10. A container is a runtime instance

A container is created from image/config inputs but has its own runtime identity: container ID, process state, writable layer, mounts, and network attachment. Two containers from the same digest can still have different runtime state.

The artifact therefore keeps image identity and container identity in separate fields.

11. Network attachment is not part of the immutable image

Network attachment is a runtime concern. Docker connects containers to explicit networks; that attachment is not derivable from an image filesystem layer or content digest.

The lab supplies direct network attachment evidence. When it is removed, the network conclusion must remain OPEN rather than being guessed from a Dockerfile, tag, or image digest.

12. A digest proves only a bounded property

A matching digest can support the conclusion that referenced bytes match the expected content identity. It does not by itself prove application health, security posture, publisher trust, provenance, or business correctness.

This lesson closes only the container/image/runtime boundary it owns. Signing, provenance, readiness, and orchestration outcomes remain separate topics.

13. Container Image Runtime Boundary Record v1

The artifact records Image Tag/Reference, Image Digest, Platform, Manifest/Config evidence, Layer Evidence, Container ID, Writable-Layer Change, Named Volume, Bind Mount, Network Attachment, Replacement Result, direct observations, inferences, unknowns, and the final bounded decision.

Each field needs traceable evidence. If a decisive item is missing, the decision remains EVIDENCE_INSUFFICIENT_OPEN.

14. Lab and transfer

The lab is fully offline and synthetic. Eight fixtures model a baseline, same-content retag, writable-layer loss after replacement, named-volume persistence, bind-mount host coupling, a platform/manifest distinction, missing decisive evidence, and a changed-context transfer case.

No registry, credential, production system, or external network is used. The transfer case requires recomputing every state from changed evidence rather than copying the baseline diagnosis.

15. Sources, freshness, and claim boundaries

On 2026-09-19 the official OCI and Docker sources were rechecked. The OCI Image Spec still defines an image in terms of a manifest, optional index, filesystem layers, and configuration; descriptor digests remain content-reference/verification evidence; Docker still describes images as immutable/layered, runtime containers as having a separate writable layer, persistent storage via volumes/bind mounts/tmpfs, and networking as a runtime attachment concern.

These claims are tool/spec-sensitive. Review is due on 2026-10-17, with earlier requalification after material OCI Image Spec, Docker storage/network, or fixture changes.

Assessment

There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.

OPS-003-S1 retrieval

State the bounded OCI/container runtime model and one non-goal.

lesson ✗AI ✗notes ✗

OPS-003-S2 application

Complete Container Image Runtime Boundary Record v1 for a supplied local fixture using only direct evidence.

lesson ✗AI ✗notes ✗

OPS-003-S3 diagnosis

Diagnose a retag, writable-layer loss, persistence, platform, or missing-evidence case without changing an unrelated boundary.

lesson ✗AI ✗notes ✗

OPS-003-S4 decision

Defend a bounded tag/digest, image/container, storage, and network conclusion against a plausible shortcut.

lesson ✗AI ✗notes ✗

OPS-003-S5 transfer

Rebuild the record for a changed digest/platform/mount/network context without copying baseline conclusions.

lesson ✗AI ✗notes ✗
Assessment rubric

A sufficient submission must satisfy all critical dimensions:

  1. Runtime/configuration model correctness — tag, digest, OCI structure, container instance, writable state, mounts, and network attachment remain distinct.
  2. Evidence quality — positive and negative observations are traceable; inference and unknowns are labeled.
  3. Scope discipline — digest is not promoted to health, trust, security, or application correctness; runtime/storage/network claims stay within evidence.
  4. Transfer independence — the changed-context case is recomputed from its own evidence.

Blocking failure occurs when tag is treated as immutable identity, container writable state is called an image layer, volume/bind data is called part of the image, or transfer copies the baseline verdict.

References & freshness

Open Container Initiative — Image Format Specification
·
Open Container Initiative — Descriptor Specification
·
Docker Docs — What is an image?
·
Docker Docs — Understanding image layers
·
Docker Docs — Storage
·
Docker Docs — Networking overview
·
MAKNOW instructional evidence design
·

Case studies

SIMPLE

A digest-pinned OCI image is inspected, a disposable container is run, and image identity is kept separate from container runtime identity.

WRONG_APPROACH

The same image content is retagged and a learner incorrectly treats the new tag text as a new immutable content identity.

EDGE_OR_FAILURE

Data written only to the container writable layer disappears after replacement while data in a named volume persists.

TRANSFER_NEAR

A changed tag points to a different digest/platform, the persistent mount changes, and network attachment must be recomputed from new evidence.

Lesson visuals

OPS003-V1

Lab files

This lab is fully local and synthetic. It models evidence that would be observed from preloaded OCI/Docker artifacts, disposable containers, a named volume, a bind-mounted test directory, and runtime network attachment.

No registry, credential, production host, privileged operation, or external network is required. Do not point the fixture at real infrastructure.

Your task is to implement analyze(case) in starter.py and produce one state for each of the eight dimensions. Keep tag/digest, image/container, writable/persistent storage, and network evidence separate. Missing decisive evidence must stay OPEN.

Lesson media & slides

MAKNOW_OPS-003_DECISION_EVIDENCE_TABLE_v1.0.0.svg
DECISION EVIDENCE TABLE v1.0.0.svg
MAKNOW_OPS-003_FAILURE_REPAIR_v1.0.0.svg
FAILURE REPAIR v1.0.0.svg
MAKNOW_OPS-003_PRIMARY_MODEL_v1.0.0.svg
PRIMARY MODEL v1.0.0.svg
MAKNOW_OPS-003_WORKED_EXAMPLE_v1.0.0.svg
WORKED EXAMPLE v1.0.0.svg

Teaching files (download)

XLSXContainer Image Runtime Boundary Record v1 v1.0.0.xlsxTeaching files (download)
DOCXContainer Image Runtime Boundary Record v1 WORKSHEET v1.0.0.docxTeaching files (download)
PDFContainer Image Runtime Boundary Record v1 WORKSHEET v1.0.0.pdfTeaching files (download)