runc and OCI runtime lifecycle
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Treat the worksheet as offline evidence. Before any separately authorized server query, verify the effective endpoint and its trust boundary, including context overrides. Do not change runtime state, mount host data or modify Desktop settings in this exercise.
Conceptual OCI lifecycle (no commands to execute):creating -> created -> running -> stopped -> deleted (state no longer exists)Case A: bundle prepared; user program not started; status createdCase B: user program runningCase C: user program exited; state still retainedThe OCI runtime lifecycle separates create from start. In the created state the runtime has prepared the container but the configured program has not yet been executed. Start executes that program; once it exits the state is stopped. Delete removes runtime resources for the stopped container, rather than deleting an image from a registry. “Deleted” in this diagram is an outcome, not a standard OCI status value. runc can configure namespaces, mounts, process credentials and limits with kernel support, but not every OCI implementation uses runc or the same isolation mechanism. Docker run combines high-level operations and Docker lifecycle states are not identical to OCI state reporting. Do not create a runtime bundle or invoke runc in this exercise. The created state means the runtime has finished creation but the configured user program has not executed and the container process has not exited. The supplied model covers only a restricted successful path, not OCI hooks, race handling or conformance.
Common mistake
Created does not mean the user application is serving traffic.
Manual practice
Classify A–C. In the supplied offline lifecycle model, try a start before create and a delete before stop; explain why rejection is expected in the simplified model.
Worksheet: lab-fixtures/docker-container-internals/06-runc/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
runc and OCI runtime lifecycle — Knowledge check
Interpret synthetic runtime and isolation evidence and explain kernel and OCI boundaries.
After runtime creation succeeds, before the configured user program executes and before the process exits, which OCI status applies?
Which event leads from running to stopped?
Is deleted a standard OCI status value in this diagram?