Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

Container Fundamentals

Direct answer

A container is a normal process on the host, isolated with namespaces (what it can see) and limited with cgroups (what it can use), started from an image that provides its filesystem. Containers share the host kernel.

When to use this

Use it to understand what a container is and isn't before troubleshooting or securing one.

First 30 seconds

1. docker ps -a / kubectl get pods — running or exited?

2. Host view: ps -ef | grep <proc> — it is a host process.

3. Namespaces: lsns -p <pid>; limits: docker stats --no-stream.

4. Data persistence: volumes mounted?

5. Logs for the exit reason.

Operational verification

image → container created with namespaces and cgroups → process runs on the shared kernel → logs/volumes

Evidence · next step

Common mistakes are confusing image state with container state, assuming isolation implies a separate kernel, treating a restart loop as a networking problem before reading the exit reason, or measuring only host capacity while a cgroup limit is the real constraint. Preserve the first divergent observation and repeat the same bounded verification after remediation.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
What not to infer

Linux owns the deep kernel mechanics; Containers owns how namespaces, cgroups, images and runtime lifecycle combine into an operational container. Virtualization owns hypervisors/VMs.

Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
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.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms · Linux owns the deep kernel mechanics; Containers owns how namespaces, cgroups, images and runtime lifecycle combine into an operational container. Virtualization owns hypervisors/VMs.
Scope / prerequisiteUse it to understand what a container is and isn't before troubleshooting or securing one.
What next?3 suggested next steps
Child topics (this level)4
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.

2 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 Verification workflow Verify boundary

Identify the image digest or tag, runtime, container ID, host and namespace/resource limits for the same workload. Verify configured state with runtime inspection, then confirm process state, exit code, resource pressure and the application endpoint instead of treating a running container flag as application evidence.

Step 2 Failure signatures and limits Narrow the fault

Common mistakes are confusing image state with container state, assuming isolation implies a separate kernel, treating a restart loop as a networking problem before reading the exit reason, or measuring only host capacity while a cgroup limit is the real constraint.

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.

test · 1
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Containers are not VMs: a kernel bug or a privileged container affects the host. Data written inside the container layer disappears when it is removed. Run one main process per container and let the runtime restart it.

Key checks
  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state
ReferenceWhat it is1 section · depth on demand

Operating model

Container Fundamentals explains the execution model behind process containers: an image supplies a filesystem and metadata, a runtime creates an isolated process environment, and the host kernel enforces namespaces, cgroups and other boundaries. Containers are not miniature virtual machines; they normally share the host kernel while keeping selected process, mount, network, IPC and resource views isolated.

ReferenceHow it works1 section · depth on demand

In depth

A container is an isolated process (or group of processes) that runs from an image containing an application and its dependencies. Unlike a virtual machine, it shares the host's kernel; isolation comes from Linux namespaces (what the process can see) and cgroups (what resources it can use). That makes containers start in milliseconds and use far less overhead than VMs.

ConceptMeaning
ImageRead-only template in layers
ContainerRunning instance with a thin writable layer
RegistryStores and distributes images
RuntimeStarts and isolates containers (containerd, runc, CRI-O)
OrchestratorRuns containers across many hosts (Kubernetes)
ContainerVM
KernelShared with hostOwn kernel
Start timeMilliseconds–secondsSeconds–minutes
IsolationProcess-levelHardware-virtualised
Typical useApplications, microservices, toolsFull OS workloads, strong isolation

Because the writable layer disappears with the container, persistent data must live in volumes, and configuration should come from environment variables, files or secrets — not from changes made inside a running container.

ReferenceImportant terms & boundaries1 section · depth on demand

Scope map

  • Containers vs virtual machines
  • Images, containers and runtime state
  • Linux namespaces and cgroups
  • OCI image/runtime model
  • Container lifecycle and exit state
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Docker Engine / Linux Docker Engine 24 or laterRun one container with explicit name, resource limits and a non-root user.

Assumptions: Image already pulled; the host has cgroup v2. Replace image, user ID and limits with your workload values.

docker run -d --name web \
  --user 1000:1000 \
  --memory 256m --cpus 0.5 \
  --read-only --tmpfs /tmp \
  -p 8080:80 \
  nginx:1.27-alpine

Expected output

Docker Engine / Linux Docker Engine 24 or laterdocker inspect web --format '{{.State.Status}} {{.Config.User}} {{.HostConfig.Memory}}'

Expected state: The container is running as the intended user with the memory limit applied by the runtime.

running 1000:1000 268435456
Status shows the process is alive; User and Memory prove the isolation settings were applied. They do not prove the application inside answers requests. Illustrative authored output: field layout matches the tool, values will differ in your environment.
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-29 · otherOCI / Docker / containerd / Kubernetes OCI Runtime Specification

Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.

Basis: https://specs.opencontainers.org/runtime-spec/ · confidence 92%
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
container fundamentalscontainer basicscontainer lifecycleOCI container model
Embedded reference data

Quick lookup tables

Container Fundamentals verification boundary matrix

A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Container Fundamentals.

BoundaryInspectHealthy interpretationDo not infer
IntentContainers vs virtual machinesIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeImages, containers and runtime state / Linux namespaces and cgroupsOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateOCI image/runtime modelIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomeContainer lifecycle and exit stateThe original bounded check succeeds in the same time windowProduction correctness outside this scope
Depth when you need it

Deep reference

Design & tradeoffs

Scope

Linux owns the deep kernel mechanics; Containers owns how namespaces, cgroups, images and runtime lifecycle combine into an operational container. Virtualization owns hypervisors/VMs.

Confirmation

Confirm action

Continue?