Use it as the entry point for running or troubleshooting containers on a Linux host.
Containers
Containers on Linux run processes isolated with namespaces and limited with cgroups, from layered images, managed by Docker, Podman or containerd (Kubernetes).
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.
image pulled → container created with namespaces/cgroups → process runs → logs/volumes/network
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
Operational reference
Fast context before you go deeper.
docker ps -aVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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
latesttags.
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.
Subtopics
Go one level deeper into this subject.
Container fundamentals explains Linux containers as processes isolated primarily by namespaces and governed by cgroups, with layered filesystem and runtime metadata rather than hardware virtualization.
Subtopic DockerDocker on Linux coordinates images, containers, networks, volumes and daemon/API state, while the effective result is still Linux process, mount, namespace and cgroup state.
Subtopic ImagesContainer Images are immutable-style content/config templates addressed by tags or digests and expanded into a runnable root filesystem plus metadata.
Subtopic VolumesContainer Volumes separate persistent data from container writable layers and require proof of source, mount target, permissions, persistence and backup semantics.
Subtopic NetworksContainer Networks map runtime endpoints into Linux network namespaces using bridges/veth/routing/NAT or other drivers and must be verified from both namespace and client paths.
Subtopic Docker ComposeDocker Compose defines a multi-container application graph of services, images, networks, volumes, dependencies, environment and lifecycle operations.
Subtopic Container TroubleshootingContainer Troubleshooting isolates failures from host/runtime and image identity through namespace/resource, mount/network and process/readiness boundaries to the original application request.
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.
docker ps -a / podman ps -a— containers and statedocker logs <c>— container outputdocker inspect <c>— configuration, mounts, networkdocker 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:
| Namespace | Isolates |
|---|---|
| Cgroup | The view of the cgroup hierarchy |
| IPC | System V IPC and POSIX message queues |
| Network | Network devices, stacks and ports |
| Mount | Mount points |
| PID | Process IDs |
| Time | The boot and monotonic clocks |
| User | User and group IDs |
| UTS | Host 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
| Element | Provided by |
|---|---|
| Isolation | Namespaces |
| Resource limits | cgroups (memory, CPU, I/O, PIDs) |
| The file system | An image: layers stacked with overlayfs |
| Reduced privileges | Dropped capabilities, seccomp filters, SELinux or AppArmor |
| Management | A runtime (runc, crun) driven by Docker, Podman, containerd or CRI-O |
Containers and virtual machines
| Container | Virtual machine | |
|---|---|---|
| Kernel | Shared with the host | Its own |
| Start time | Milliseconds to seconds | Seconds to minutes |
| Isolation strength | Kernel boundary | Hypervisor boundary |
| Guest OS | Same 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.
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 feature | Provides |
|---|---|
| Namespaces (pid, net, mnt, uts, ipc, user, cgroup) | Isolated views |
| cgroups v2 | Resource limits and accounting |
| OverlayFS | Layered image filesystem with writable top layer |
| Capabilities, seccomp | Reduced privileges and system calls |
| User namespaces / rootless | Container 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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.
Quick lookup tables
Containers operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Containers.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux 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 verification | Pin 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 chain | image/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | 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. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux container/virtualization evidence can establish this proof path: image/config → runtime → namespace/cgroup setup → filesystem/volume/network attachment → container process → readiness → client workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It 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 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. | 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 boundary | Containers |
|---|---|
| Topic path | Containers |
| Runtime state | Linux 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 chain | image/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 boundary | 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. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |