Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Containers

Direct answer

Containers on Linux run processes isolated with namespaces and limited with cgroups, from layered images, managed by Docker, Podman or containerd (Kubernetes).

When to use this

Use it as the entry point for running or troubleshooting containers on a Linux host.

First 30 seconds

1. docker ps -a — running or exited (exit code)?

2. docker logs <c> — why it exited.

3. docker inspect <c> — image, mounts, ports, env.

4. Host: resources, disk (docker system df).

5. Network: published ports and container network.

Operational verification

image pulled → container created with namespaces/cgroups → process runs → logs/volumes/network

Evidence · next step

For Containers, 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
Key commanddocker ps -a
Scope / prerequisiteUse it as the entry point for running or troubleshooting containers on a Linux host.
What next?3 suggested next steps
Child topics (this level)7
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.

6 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

image/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workload

Healthy evidence: the intended image/config produces the expected isolated process, resource limits, mounts and network path and the workload passes

Step 2 Verification and output interpretation Verify boundary

Verification path. Start at lifecycle state, then inspect the exact container/VM process and its namespaces/resources. For networking, correlate guest/container interface/address/route with virtual bridge/tap/veth and host uplink/firewall. For storage, trace volume/disk backing to host filesystem/block device. Verify the application inside the instance and from the required external path. Distinguish image configuration from the mutable running layer and preserve container/VM IDs during evidence capture.

Existing fast checks for this Topic. - 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 chain. image/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workload

Step 3 Commands Verify boundary
docker ps -a
docker images
docker logs <ctr>
podman ps
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: container is running but wrong image/config, namespace, mount, cgroup or network state causes the workload to fail

Next check: Continue 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.

Step 5 Native branching decision path Narrow the fault

Observation → implication → next check: if the runtime cannot resolve the container ID, inspect runtime metadata first. If the container exists but is exited/restarting, inspect exit code and logs. If the process is running but the workload fails, enter the container namespaces and compare mounts, DNS/network and cgroup pressure. If namespace-local checks pass, move to the host veth/bridge/firewall/storage boundary and finally repeat the original request.

Step 6 Common mistakes Narrow the fault
  • Running containers as root without need.
  • Using latest tags.
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
Drill down

Subtopics

Go one level deeper into this subject.

Key points

A container is just a process on the host — ps on the host shows it. Data in the container layer is lost when it is removed; use volumes. Membership of the docker group equals root.

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
ReferenceHow it works1 section · depth on demand

How it works

Linux Containers isolate processes through namespaces while cgroups account and limit resources; the runtime additionally owns image layers, writable overlay state, mounts, network namespaces and lifecycle metadata. A container process can be healthy inside its namespace while the host-side veth, mount, cgroup or storage layer is broken. Bind evidence to the same container ID/PID and distinguish runtime desired state from kernel-owned effective state.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

Container health is confirmed only when the intended runtime object has the expected isolation/resources and the original workload succeeds; running state alone is insufficient.

In depth

Containers on Linux: what the kernel provides

A container is a group of ordinary Linux processes, isolated with kernel features. The two most important are namespaces, which decide what a process can see, and control groups, which decide how much it can use. The namespaces(7) manual page lists the namespace types:

NamespaceIsolates
CgroupThe view of the cgroup hierarchy
IPCSystem V IPC and POSIX message queues
NetworkNetwork devices, stacks and ports
MountMount points
PIDProcess IDs
TimeThe boot and monotonic clocks
UserUser and group IDs
UTSHost name and domain name

Each process's namespaces appear as links in /proc/<pid>/ns/. clone, unshare and setns create or join them. Most need CAP_SYS_ADMIN, but since Linux 3.8 user namespaces need no privilege.

What makes up a container

ElementProvided by
IsolationNamespaces
Resource limitscgroups (memory, CPU, I/O, PIDs)
The file systemAn image: layers stacked with overlayfs
Reduced privilegesDropped capabilities, seccomp filters, SELinux or AppArmor
ManagementA runtime (runc, crun) driven by Docker, Podman, containerd or CRI-O

Containers and virtual machines

ContainerVirtual machine
KernelShared with the hostIts own
Start timeMilliseconds to secondsSeconds to minutes
Isolation strengthKernel boundaryHypervisor boundary
Guest OSSame kernel type (Linux on Linux)Any

Seeing it from the host

host$ docker run -d --name web1 nginx:1.27
host$ pid=$(docker inspect -f '{{.State.Pid}}' web1)
host$ sudo ls -l /proc/$pid/ns | awk '{print $9, $11}' | head -4
cgroup cgroup:[4026532812]
ipc ipc:[4026532751]
mnt mnt:[4026532749]
net net:[4026532753]
host$ sudo nsenter -t $pid -n ip -br address
eth0@if12        UP             172.17.0.2/16
host$ cat /proc/$pid/cgroup
0::/system.slice/docker-3f1c...scope
host$ ps -o pid,user,cmd -p $pid

Reading the example

The container's main process is an ordinary process on the host, with its own network and mount namespaces and its own cgroup. nsenter enters only its network namespace, so host tools such as ip can inspect the container's network without anything installed inside the container.

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

Containers is part of Containers. Linux Containers covers OS-level isolation from image/runtime inputs through namespaces, cgroups, storage and networking to container process readiness and the original workload.

Runtime state ownership and mechanics. Containers isolate processes with namespaces/cgroups and a layered filesystem while sharing the host kernel; KVM/QEMU virtual machines provide virtual hardware to a guest with stronger kernel separation. Docker/libvirt add lifecycle, image/disk, network and volume abstractions above those primitives. Host, container and guest each have their own process/network/mount identity, so an observation must be attached to the correct namespace or VM boundary.

Topic-specific state model. Linux Containers covers OS-level isolation from image/runtime inputs through namespaces, cgroups, storage and networking to container process readiness and the original workload.

Technical metadata. Linux distribution + kernel + runtime/hypervisor version + host/object identity + image/definition + process/namespace/cgroup or VM hardware + storage/network attachments + guest/container readiness + original workload result.

Interpretation rule. - Requested/defined state ≠ effective runtime state.

  • Runtime object present/running ≠ guest or container workload ready.
  • Host-local success ≠ external client or dependent service success.
  • A successful management operation ≠ durable verified outcome.

Quick reference

On Linux, containers are ordinary processes isolated by kernel features rather than by a hypervisor. Namespaces give each container its own view of processes, network, mounts and hostnames; cgroups limit CPU, memory and I/O; and capabilities, seccomp and SELinux/AppArmor restrict what the process may do. Images package the filesystem layers the container runs from.

Kernel featureProvides
Namespaces (pid, net, mnt, uts, ipc, user, cgroup)Isolated views
cgroups v2Resource limits and accounting
OverlayFSLayered image filesystem with writable top layer
Capabilities, seccompReduced privileges and system calls
User namespaces / rootlessContainer root mapped to unprivileged host user
podman ps; docker ps
podman inspect web --format '{{.State.Pid}}'
lsns -p $(podman inspect web --format '{{.State.Pid}}')
systemd-cgls; cat /sys/fs/cgroup/system.slice/*/memory.max 2>/dev/null | head
podman run --rm --read-only --cap-drop=ALL --security-opt no-new-privileges docker.io/library/alpine id

Because containers share the host kernel, a kernel vulnerability affects all of them; keep the host patched, run containers rootless or as non-root users, and drop capabilities they do not need.

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. Container health is confirmed only when the intended runtime object has the expected isolation/resources and the original workload succeeds; running state alone is insufficient.

Model. A running container/VM does not show application readiness. Container localhost is not host localhost, and host files may appear differently through bind mounts, user namespaces or SELinux labels. Published ports can be blocked by host firewall or bind-address policy. Containers share the host kernel, so kernel/module constraints differ from VMs. Snapshot/image existence is not a verified backup. Keep host, virtualization layer and guest workload state separate.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. Treat image/compose/libvirt definitions as desired state and runtime inspect output as actual state. Keep persistent data in explicit volumes/disks and document bind-mount ownership/labels. Network mode, published ports, bridge/namespace attachment and host firewall interact. Resource limits map to cgroups or hypervisor controls and may differ from what a guest/container sees. Recreate ephemeral instances from source rather than hand-editing runtime state when declarative ownership exists.

Distribution/platform context. Containers owns the Linux container execution model; Docker, Volumes, Networks and troubleshooting Topics own deeper boundaries.

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. 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 containerlinux containerscontainer lifecyclecontainer runtime linuxos level virtualizationrunning container
Embedded reference data

Quick lookup tables

Containers operational reference

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

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateLinux Containers covers OS-level isolation from image/runtime inputs through namespaces, cgroups, storage and networking to container process readiness and the original workload.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 chainimage/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryContainer health is proven only when the intended runtime object has the expected isolation/resources and the original workload succeeds; running state alone is insufficient.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux container/virtualization evidence can establish this proof path: image/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workloadUse 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. Container health is proven only when the intended runtime object has the expected isolation/resources and the original workload succeeds; running state alone is insufficient.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.

Containers · operational reference

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

Reference boundaryContainers
Topic pathContainers
Runtime stateLinux Containers covers OS-level isolation from image/runtime inputs through namespaces, cgroups, storage and networking to container process readiness and the original workload.
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 chainimage/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryContainer health is proven only when the intended runtime object has the expected isolation/resources and the original workload succeeds; running state alone is insufficient. 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?