Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Images

Direct answer

A container image is a stack of read-only layers plus configuration (entrypoint, env, ports), identified by name:tag and an immutable digest, stored in registries.

When to use this

Use it to pull, build, tag or inspect images, or when a container runs an unexpected version.

First 30 seconds

1. docker image ls — tag and ID.

2. Digest: docker image inspect <img> --format '{{.RepoDigests}}'.

3. Which image does the container run? docker inspect <c> --format '{{.Image}}'.

4. Pull failing → registry auth/proxy/DNS.

5. Scan: trivy image <img>.

Operational verification

Dockerfile → build → layers → tag/digest → pushed → pulled → container

Evidence · next step

For Containers → Images, continue with the first unproven Topic check: Pin exact host, runtime/hypervisor, object identity, source revision/image/definition and failing workload. If that boundary is healthy, advance to the adjacent check: Read back effective runtime state including process, namespace/resource or virtual-hardware boundaries. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to pull, build, tag or inspect images, or when a container runs an unexpected version.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

registry/local store → tag/digest resolution → manifest/platform → layers → config/entrypoint → container rootfs → process

Healthy evidence: the expected digest/platform/layers/config are selected and produce the intended runtime filesystem and entrypoint

Step 2 Verification and output interpretation Verify boundary

Verification chain. registry/local store → tag/digest resolution → manifest/platform → layers → config/entrypoint → container rootfs → process

Step 3 Commands Verify boundary
docker pull nginx:1.27
docker image ls
docker image inspect nginx:1.27 --format '{{.Id}}'
docker image prune
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: a familiar tag points to another digest, wrong architecture is selected, cached layers hide change, or runtime overrides image config

Image identity is confirmed by digest/platform and effective config, not by a mutable tag alone.

Step 5 Common mistakes Narrow the fault
  • latest tags in production.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Tags such as latest move; pin by digest for reproducibility. Scan images for vulnerabilities (trivy, docker scout). Keep images small and rebuild for security updates.

Key checks
  • docker ps -a / podman ps -a — containers and state
  • docker logs <c> — container output
  • docker inspect <c> — configuration, mounts, network
  • docker info — engine, storage driver, cgroup version
ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

Image identity is confirmed by digest/platform and effective config, not by a mutable tag alone.

In depth

Building good container images

A good image is small, reproducible, rebuilt regularly and doesn't run as root. Docker's build best practices recommend:

  • Multi-stage builds, so that only what's needed at runtime ends up in the final image.
  • A minimal base image, because fewer packages mean fewer vulnerabilities.
  • Pinning the base image to a digest, so a republished tag can't silently change builds (with tools such as Dependabot to keep the pins current).
  • A .dockerignore file.
  • Combining apt-get update with apt-get install in one RUN.
  • A non-root USER, with explicit UIDs and GIDs.
  • One concern per container.
  • Frequent rebuilds with --pull, so base image updates are picked up.

A multi-stage Dockerfile

host$ cat Dockerfile
# syntax=docker/dockerfile:1
FROM python:3.12-slim@sha256:<digest> AS build
WORKDIR /src
COPY requirements.txt .
RUN pip wheel --no-cache-dir --wheel-dir /wheels -r requirements.txt

FROM python:3.12-slim@sha256:<digest>
RUN groupadd -g 10001 app && useradd -u 10001 -g app -s /usr/sbin/nologin app
WORKDIR /app
COPY --from=build /wheels /wheels
RUN pip install --no-cache-dir /wheels/* && rm -rf /wheels
COPY --chown=app:app src/ ./
USER 10001:10001
EXPOSE 8080
ENTRYPOINT ["python", "-m", "report_api"]
host$ cat .dockerignore
.git
__pycache__
tests/
*.env
host$ docker build --pull -t registry.example.net/report-api:1.4.2 .
host$ docker image ls registry.example.net/report-api
host$ docker push registry.example.net/report-api:1.4.2

Why each line is there

ElementReason
Build stage with wheelsCompilers and build tools stay out of the final image
@sha256: digestThe exact same base image every time
A fixed UID 10001Predictable file ownership on volumes; not root
.dockerignoreNo Git history or secrets in the build context
Exec-form ENTRYPOINTThe program is PID 1 and receives signals directly

Tags and digests

Tags like latest, or even 1.4, can be moved to another image. Deployments that must be reproducible should reference images by digest, or by an immutable version tag. Scanning images (Trivy, Grype, or the registry's own scanner) before deployment catches known vulnerabilities in packages.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

Images is part of Containers → Images. Container Images are immutable-style content/config templates addressed by tags or digests and expanded into a runnable root filesystem plus metadata.

Topic-specific state model. Container Images are immutable-style content/config templates addressed by tags or digests and expanded into a runnable root filesystem plus metadata.

Quick reference

Images are layered: each Dockerfile instruction that changes files creates a layer; layers are shared between images. Identify images by digest for reproducibility.

docker pull nginx:1.27
docker image inspect nginx:1.27 --format '{{index .RepoDigests 0}}'
docker history nginx:1.27
docker build -t app:1.4.2 .
docker buildx build --platform linux/amd64,linux/arm64 -t registry.example.com/app:1.4.2 --push .
trivy image app:1.4.2           # vulnerability scan

Good images: small base (distroless/alpine/ubi-minimal), multi-stage builds, non-root USER, no secrets in layers (they remain in history), pinned versions.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. Image identity is confirmed by digest/platform and effective config, not by a mutable tag alone.

Snapshot/image existence is not a verified backup.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. Images owns image identity and composition; build pipelines and registry security belong to Automation/Security where applicable.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Containers → Images. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.docker.com/engine/ · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
docker imagescontainer image digestoci image
Embedded reference data

Quick lookup tables

Images operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Images.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateContainer Images are immutable-style content/config templates addressed by tags or digests and expanded into a runnable root filesystem plus metadata.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + object identity + source image/definition → verify host/runtime capability → read back effective process/namespace/cgroup or virtual-hardware state → verify storage/network attachments → verify guest/container readiness → repeat original workload + regression check.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainregistry/local store → tag/digest resolution → manifest/platform → layers → config/entrypoint → container rootfs → processTrace requested/configured state through effective state to the observed workload result.
Failure boundaryImage identity is proven by digest/platform and effective config, not by a mutable tag alone.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux container/virtualization evidence can establish this proof path: registry/local store → tag/digest resolution → manifest/platform → layers → config/entrypoint → container rootfs → processUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove unobserved clients, names, identities, routes, sessions, backends or time periods. Image identity is proven by digest/platform and effective config, not by a mutable tag alone.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven runtime boundary, capture adjacent host/object/resource/attachment evidence, make only the demonstrated persistent change, then repeat the original workload plus a regression check.Continue to the next unresolved boundary while preserving the original test condition.

Images · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryImages
Topic pathContainers → Images
Runtime stateContainer Images are immutable-style content/config templates addressed by tags or digests and expanded into a runnable root filesystem plus metadata.
Fast checks- Pin exact host, runtime/hypervisor, object identity, source revision/image/definition and failing workload. - Read back effective runtime state including process, namespace/resource or virtual-hardware boundaries. - Trace storage and network attachments plus readiness from the real client or dependent workload path. - Apply the smallest persistent change, then repeat the original workload and an adjacent regression check.
Verification chainregistry/local store → tag/digest resolution → manifest/platform → layers → config/entrypoint → container rootfs → process Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryImage identity is proven by digest/platform and effective config, not by a mutable tag alone. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?