Interview's MateDocker
Interview's Mate

Docker

Compose · Networking · Security · Ops

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Docker topics
Lesson 2/ 160
01. Containerization & Docker Fundamentals

History & Evolution of Linux Containers (LXC, Docker, OCI)

Trace the path from chroot and LXC to Docker popularity and OCI standardization.

BeginnerLXC · Docker3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Container technology existed before Docker, but Docker made building, moving and running the pieces easy, and OCI let other tools use the same formats.

Think of it like…

Docker is like the browser that made an older network useful to millions: the internet primitives existed, but a familiar interface, packaging and sharing turned them into a daily workflow.

Where you’ve seen it

In practice, runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}} is the concrete move for this job: trace the path from chroot and LXC to Docker popularity and OCI standardization. The release is not accepted until compare the generated OCI config.json shape with the image layout reported by Docker confirms the result.

Words you’ll hear

LXC
The implementation control in runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}} for trace the path from chroot and LXC to Docker popularity and OCI standardization.
Docker
The result to observe with compare the generated OCI config.json shape with the image layout reported by Docker, rather than infer from a successful command alone.
OCI
The production boundary exposed when assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI.

Visual diagram

Loading interactive diagram

Theory & deep dive

LXC control path

The concrete mechanism is runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}}. The observable result is compare the generated OCI config.json shape with the image layout reported by Docker; if those disagree, inspect the runtime evidence before changing unrelated settings.

Trace the path from chroot and LXC to Docker popularity and OCI standardization. Keep LXC, Docker and OCI in the same deployment record so the intent and the observed state cannot drift apart.

Concrete LXC setup

runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}}

Key takeaway: Prove Docker with compare the generated OCI config.json shape with the image layout reported by Docker, not with command success alone.

OCI failure boundary

Knowing the timeline prevents a common misconception in interviews: Docker is not a Linux isolation primitive, and a container is not one proprietary binary. The practical stack can mix Docker, containerd, CRI, runc, Buildah and Kubernetes around common OCI artifacts. The narrow failure to design for is assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI.

Accept this compromise explicitly: Historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia. The controlled check-compare the generated OCI config.json shape with the image layout reported by Docker-also identifies the point where a different design is safer.

Deliberate failure test

Exercise this failure safely: assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI.

Key takeaway: Historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia.

How it works, step by step

Step 1 of 4
Design

1. State the boundary

Write down why the workload needs this: Knowing the timeline prevents a common misconception in interviews: Docker is not a Linux isolation primitive, and a container is not one proprietary binary. The practical stack can mix Docker, containerd, CRI, runc, Buildah and Kubernetes around common OCI artifacts.

Container technology existed before Docker, but Docker made building, moving and running the pieces easy, and OCI let other tools use the same formats.
Key numbers at this step
Intent
LXC

When to use it & trade-offs

What it is

The container story runs from chroot and FreeBSD jails through Linux namespaces and cgroups, LXC in 2008, Docker in 2013, and the OCI image/runtime specifications published from 2015. Docker popularized a workflow and distribution model; OCI made images and runtimes interoperable.

Why it matters: Knowing the timeline prevents a common misconception in interviews: Docker is not a Linux isolation primitive, and a container is not one proprietary binary. The practical stack can mix Docker, containerd, CRI, runc, Buildah and Kubernetes around common OCI artifacts.

When to reach for it

  • The fit is strongest for this job: trace the path from chroot and LXC to Docker popularity and OCI standardization. Pair it with compare the generated OCI config.json shape with the image layout reported by Docker in the runbook.
  • Production LXC changes should make Docker observable through runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}}, rather than trusting the runtime default.
  • Keep a rollback example for the case where assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI.

When to avoid or be careful

  • Do not accept command success while the system can still fail by assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI.
  • Avoid erasing OCI protection merely to dodge this cost: “Historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia”.
  • Do not replace the evidence path-compare the generated OCI config.json shape with the image layout reported by Docker-with a screenshot or a mutable tag.

runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}}: practical choices

Explicit LXC
Best for: Trace the path from chroot and LXC to Docker popularity and OCI standardization, with a reviewed runbook.

Strengths: The container story runs from chroot and FreeBSD jails through Linux namespaces and cgroups, LXC in 2008, Docker in 2013, and the OCI image/runtime specifications published from 2015. Docker popularized a workflow and distribution model; OCI made images and runtimes interoperable.

Watch out: Historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia.

Ambient default
Best for: Short-lived Docker experiments with low blast radius.

Strengths: It can begin with runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}} and fewer surrounding controls.

Watch out: It silently accepts assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI, which makes the result hard to reproduce after promotion.

Managed OCI
Best for: Teams that centralize OCI policy across many workloads.

Strengths: Knowing the timeline prevents a common misconception in interviews: Docker is not a Linux isolation primitive, and a container is not one proprietary binary. The practical stack can mix Docker, containerd, CRI, runc, Buildah and Kubernetes around common OCI artifacts.

Watch out: The platform adds an ownership and debugging layer; retain compare the generated OCI config.json shape with the image layout reported by Docker as the direct check.

Interview signals & numbers to know

When this topic comes up

  • runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}}
  • compare the generated OCI config.json shape with the image layout reported by Docker
  • Failure signature: assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI
  • Trade-off: Historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia.

Benchmarks & rules of thumb

1979 -
chroot entered Unix V7-era systems
2013 -
Docker made the image workflow mainstream
2015 -
OCI began standardizing image and runtime formats

Common mistakes & follow-ups

Common interview mistakes

  • Treating a successful runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}} as proof and skipping compare the generated OCI config.json shape with the image layout reported by Docker.
  • Assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI
  • Optimizing LXC without accepting that historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia.

Likely interviewer follow-ups

  • Why does runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}} address LXC here rather than through application code?
  • How would you distinguish healthy Docker from the failure “assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI” using compare the generated OCI config.json shape with the image layout reported by Docker?
  • When would this trade-off-“Historical compatibility matters, but production choices should be based on current OCI conformance, lifecycle ownership and security support-not nostalgia”-justify a different OCI design?
Interview tip: Give one concrete operation-runc spec && docker image inspect alpine:3.21 --format {{.RootFS.Layers}}-and one proof-compare the generated OCI config.json shape with the image layout reported by Docker. Then name the boundary: assuming docker run is the runtime specification and overlooking that images and execution contracts are standardized by OCI.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply History & Evolution of Linux Containers (LXC, Docker, OCI) with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
What are Containers? (Containers vs Virtual Machines)
Next topic
Docker Architecture (Docker Engine, Daemon, CLI, REST API)