Container Lifecycle Language
5 exercises — Master the English vocabulary of the container lifecycle: state transitions, restart policies, OOM kills, health check states, and exit codes.
0 / 5 completed
Quick reference: Container lifecycle vocabulary
- States — created → running → (paused) → exited → removed
- unless-stopped — restarts after crash/reboot but not after deliberate docker stop
- Exit 137 = SIGKILL (128+9), OOM kill; Exit 143 = SIGTERM (128+15), docker stop
- Health check states — starting → healthy → unhealthy
- Orchestrators (Swarm, K8s) auto-replace unhealthy containers; plain Docker does not
1 / 5
A developer runs docker ps -a and asks a teammate: "Walk me through the full container lifecycle — what states can a container be in and in what order?"
Which sequence correctly describes the Docker container state flow?
Docker container states: created → running → (paused) → exited → removed.
The Docker container lifecycle states are:
• created — the container has been created (
• running — the main process (ENTRYPOINT/CMD) is executing; the container is alive
• paused — processes are suspended via SIGSTOP (
• exited (stopped) — the main process has terminated; container metadata and filesystem still exist until
• dead — Docker could not properly stop or remove the container; a rare error state requiring manual cleanup
Key vocabulary:
• container state — the current lifecycle phase (created / running / paused / exited / dead)
• exited — a stopped container whose main process has terminated; metadata persists until removed
• docker ps -a — lists all containers including stopped ones; without
• docker rm — removes a stopped container and frees its filesystem and metadata
The Docker container lifecycle states are:
• created — the container has been created (
docker create) but not started• running — the main process (ENTRYPOINT/CMD) is executing; the container is alive
• paused — processes are suspended via SIGSTOP (
docker pause); memory is preserved but CPU is not consumed• exited (stopped) — the main process has terminated; container metadata and filesystem still exist until
docker rm• dead — Docker could not properly stop or remove the container; a rare error state requiring manual cleanup
docker ps shows only running containers. docker ps -a shows containers in all states including exited. A container must be explicitly removed with docker rm to free all resources.Key vocabulary:
• container state — the current lifecycle phase (created / running / paused / exited / dead)
• exited — a stopped container whose main process has terminated; metadata persists until removed
• docker ps -a — lists all containers including stopped ones; without
-a, shows only running containers• docker rm — removes a stopped container and frees its filesystem and metadata