Container security and OCI orientation
Quick answer
OCI standardizes container image, distribution and runtime interfaces. Container engines such as Docker and Podman manage images and containers using runtime components. Review image provenance and runtime privileges before executing workloads.
A mutable image tag can point to different content over time. Recording a digest identifies specific content, but does not establish trust by itself. Review provenance, mounted directories, capabilities and network exposure before starting the workload.
Prepare the practice environment
Run python3 lab-fixtures/containers-virtualization/setup.py from the extracted root as an ordinary user. Enter the printed private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. The Python helper parses fictional examples or inspects its own child. No runtime daemon, external network or root access is needed. Do not apply the fictional JSON to any runtime. Version checks need the named tools.
Prerequisites
Review: KVM, QEMU and libvirt.
How it works
An OCI image includes manifests, configuration and filesystem layers; a runtime bundle describes a root filesystem and execution configuration. A registry distributes content. Tags can change; a trusted digest identifies content, but digest pinning alone does not establish provenance or safety. Verify trusted sources and signatures where supported and scan/update dependencies. Runtime security includes non-root identity, narrow capabilities, no-new-privileges, seccomp and mandatory access control, limited resources, read-only root filesystem where feasible, and explicitly scoped writable storage. Mounting the rootful engine socket into a workload can give powerful control of the host via its API. A read-only mount of a socket is not an API authorization boundary. Avoid host namespaces and broad bind mounts unless specifically justified. A rootless engine reduces host-root exposure but cannot protect files the user can already access. The sample review records are educational JSON, not OCI or engine configuration schemas; the checker detects selected obvious risks only.
Try the examples
A limited static review finds none of the selected flags; this is not security certification.
Expected stdout:
no modeled findingsThe model flags four known risk categories without applying the configuration.
Expected stdout:
findings: privileged; host-root mount; engine socket; host networkRun only in an authorized lab with Docker installed; this is a client version check, not a daemon health or isolation test.
Manual example; not executed locally. Follow its stated environment restrictions.
Common mistakes
Never treat a clean static check, a digest or an image scanner as proof of safety. Do not connect a workload to a real engine socket or disable sandbox policies to run this lesson.
Practice
Compare restricted.json with risky.json. Explain each flagged boundary and propose a narrowly scoped data mount and an explicit update/verification policy. Do not run either profile.
Related references
Study: docker, podman. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Container security and OCI orientation — Knowledge Check
Apply container and virtualization concepts to concrete local examples.
What can an image digest establish when trusted?
Why is an engine socket mount dangerous?
What is OCI runtime configuration concerned with?
What does a clean teaching checker establish?