·9 min read

Docker - History and Evolution of Containerization

How we got from chroot in 1979 to Docker and Kubernetes, and what each step actually added.

Everyone thinks Docker invented containers. It didn't. Docker just made them actually usable.

The first time I saw Docker was in 2014, and my initial reaction was "wait, this is just a nicer chroot?" Then I actually tried it, and suddenly the "it works on my machine" problem that had plagued every deployment I'd ever done just... vanished.

But Docker didn't appear out of nowhere. Containers have a 40-year history of people trying to solve the same problem: how do we run multiple things on one server without them interfering with each other?

Bottom line: Containers evolved from Unix hackers trying to isolate processes (chroot, 1979) → proper OS-level virtualization (FreeBSD Jails, Solaris Zones, LXC) → developer-friendly packaging (Docker, 2013) → open standards and orchestration (OCI, Kubernetes). Each step made it easier to use, until it became the default way we deploy software.


The Problem Docker Actually Solved

Before containers, here's what deploying an app looked like:

You'd write code on your MacBook. It works perfectly. You push to staging, a CentOS server. Now you're debugging why Python 2.7.3 behaves differently than your local 2.7.10. You finally get it working. Push to production, a different CentOS version. Now libc is a different version and your app segfaults on startup.

Sound familiar?

The "solution" was VMware. Spin up a whole virtual machine for each app. Problem: each VM needs its own OS, which means:

  • 5-10 minutes to boot a VM (try telling developers to wait 5 minutes every time they test something)
  • GBs of RAM wasted on duplicate operating systems
  • Patching 50 different OS instances when a security issue drops

VMs solved isolation but created new problems. We needed something lighter.


The Roots of Containerization

chroot (1979)

It starts with chroot, added to Unix Version 7 in 1979 and to BSD in 1982. It changes the root directory for a process and its children. That's it. Filesystem view only: no process isolation, no network isolation, no resource limits. A root process can also break out of a chroot, so it was never a security boundary.

# Basic chroot example
sudo chroot /path/to/new/root /bin/bash

Fun fact: if you've ever built a Debian package with pbuilder or run debootstrap, you've used this 45-year-old idea directly.

FreeBSD Jails (2000)

Jails shipped in FreeBSD 4.0 (March 2000) and were the first thing that really looked like a container: its own process tree, its own hostname, its own IP address, and a root user that can't touch anything outside the jail. What they did not have at first is resource limits. CPU and memory caps came much later, with rctl in FreeBSD 9 (2012).

Linux-VServer (2001)

The first big Linux attempt: multiple isolated "virtual private servers" on one kernel, with CPU, memory and disk quotas. The catch was that it lived as an out-of-tree kernel patch, so you ran a patched kernel to use it. That's a theme you'll see again.

Solaris Zones (2004)

Sun's version, first shown in 2004 and shipped in Solaris 10 in 2005. Zones plus resource management were marketed together as "Solaris Containers", which is one of the earliest uses of the word for this. Zones had good isolation and real resource controls years before Linux had a mainline equivalent.


Linux Container Technologies

OpenVZ (2005)

OpenVZ is the open-source core of Virtuozzo, a commercial product from SWsoft (later Parallels), released in 2005. Shared kernel, isolated user spaces, templates for spinning up containers, CPU/memory/I/O limits. A lot of cheap VPS hosting in the late 2000s was actually OpenVZ. Same problem as VServer though: patched kernel.

The kernel pieces (2002-2013)

This is the part that actually matters for Docker. Instead of one big patch, the isolation primitives got merged into mainline Linux piece by piece:

  • Namespaces: what a process can see. Mount namespaces came first (2002, kernel 2.4.19), then UTS, IPC, PID and network over 2006-2009. User namespaces were only complete in kernel 3.8 (2013).
  • cgroups: what a process can use (CPU, memory, I/O). Started at Google as "process containers" and merged in kernel 2.6.24 (January 2008).
  • Capabilities: split root's power into pieces like CAP_NET_ADMIN and CAP_SYS_ADMIN, so a "root" process inside a container can be a lot less than real root.

Union/layered filesystems are not in that list on purpose. Early Docker used AUFS, which was never merged into mainline Linux. OverlayFS only got merged in kernel 3.18 (late 2014), and that's what overlay2 uses today.

LXC (2008)

LXC put namespaces and cgroups together with userspace tools, and it ran on a stock kernel. No patches. That's the big deal, and it's why Docker could exist at all.

# Example LXC container creation
lxc-create -n mycontainer -t ubuntu
lxc-start -n mycontainer

It worked, but it felt like managing a small VM: you got a whole OS userland, configured it by hand, and there was no standard way to package an app and ship it somewhere else.


The Docker Revolution

Docker Origins (2013)

Solomon Hykes showed Docker in a 5-minute lightning talk at PyCon US in March 2013. It came out of dotCloud, a PaaS company that renamed itself Docker Inc. later that year. The first versions were literally a wrapper around LXC. In Docker 0.9 (March 2014) they switched the default to their own Go library, libcontainer, and dropped the dependency on LXC tools.

So technically, nothing new. Docker took kernel features that already existed and put a developer-friendly workflow on top.

What Made Docker Different?

1. Developer Experience

A Dockerfile and three commands: docker build, docker run, docker push. Same commands on your laptop and on the server.

# Simple Dockerfile example
FROM ubuntu:20.04
WORKDIR /app
RUN apt-get update && apt-get install -y python3
COPY . .
CMD ["python3", "app.py"]

2. Image Layering

Images are built in layers, and layers are shared and cached. That's why the apt-get line above comes before COPY . .: change one line of your code and only the last layers rebuild. Put COPY first and every code change reinstalls Python.

3. Registry System

Docker Hub gave everyone one place to pull nginx or postgres from, with tags for versions. This is underrated. LXC had templates, but nothing like docker pull from a public registry.

4. Portability

The image carries all the userspace dependencies. The only thing it shares with the host is the kernel. That's also the fine print: a Linux image needs a Linux kernel, which is why Docker Desktop on Mac and Windows runs a small Linux VM under the hood.

Docker Timeline

  • 2013: Open-sourced in March, after the PyCon demo
  • 2014: Docker 1.0 in June. Docker buys Orchard, the company behind Fig, which becomes Docker Compose
  • 2015: Docker and others found the Open Container Initiative (OCI) in June, and Docker donates runc as the reference runtime
  • 2016: Docker 1.12 builds "swarm mode" into the engine (the older standalone Swarm existed since 2014-2015). Docker starts splitting out containerd
  • 2017: Docker CE/EE split, the Moby project, containerd donated to CNCF. In October, Docker announces Kubernetes support, which is basically conceding the orchestration war
  • 2019: Mirantis buys Docker Enterprise. Docker Inc. refocuses on developer tools (Desktop, Hub)

Why OCI Matters

OCI is the reason "Docker image" today really means "OCI image". There are three specs: the runtime spec (how to run a container from a filesystem bundle, implemented by runc), the image spec (the layers and manifest format), and the distribution spec (how registries serve images, finalized in 2021).

In practice this means an image you build with docker build runs on containerd, CRI-O or Podman without changes, and any registry (Harbor, ECR, GCR, Artifactory) can store it. Without OCI we'd probably have three incompatible image formats right now.


Container Orchestration Era

Why Orchestration?

Running one container is easy. Running hundreds across many machines means you need scheduling, networking between containers, service discovery, load balancing, health checks that replace dead containers, and rolling updates without downtime. Docker alone didn't do that.

Kubernetes (2014)

Google announced Kubernetes in June 2014, based on what they learned from Borg, their internal cluster manager (running since around 2004, so about a decade of experience at that point). Kubernetes 1.0 came out in July 2015, and at the same time Google donated it to the newly created Cloud Native Computing Foundation.

The core ideas:

  • Pods: Groups of containers that work together
  • Services: Stable network endpoints for pods
  • Deployments: Declarative application updates
  • ConfigMaps/Secrets: Configuration and sensitive data management

Why Kubernetes Won

  • Google's experience: Borg and Omega were the blueprint
  • Vendor neutral: Living in CNCF meant AWS, Microsoft and Red Hat could all bet on it without betting on Google
  • Extensible: CRDs and operators let anyone add their own resource types
  • Ecosystem: Once everyone was on it, the tooling followed
# Basic Kubernetes deployment
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.21
        ports:
        - containerPort: 80

Other Orchestration Platforms

  • Docker Swarm: Built into Docker Engine and much easier to learn, but fewer features and a much smaller ecosystem. Still fine for a handful of hosts.
  • Apache Mesos: A "data center OS" that could run containers, Hadoop, and more. Powerful but complex, and it faded once Kubernetes took over.
  • Amazon ECS: Deep AWS integration, no control plane to manage, and fully tied to AWS.

Modern Container Ecosystem

Container Runtimes

Here's the part that confuses people: Docker Engine is not really "the runtime" anymore. Under dockerd sits containerd, and under that sits runc, which does the actual namespace and cgroup setup.

  • Docker Engine: The full developer platform (build, networking, volumes, CLI). The extra overhead is the dockerd daemon on top, not the containers themselves.
  • containerd: Donated to CNCF by Docker in 2017, graduated 2019. The default runtime in most Kubernetes distributions today.
  • CRI-O: Built only for Kubernetes, implements the CRI and nothing more. Default in OpenShift.
  • Podman: Red Hat's daemonless, rootless alternative with a Docker-compatible CLI (alias docker=podman mostly works).

Kubernetes removed dockershim in v1.24 (May 2022). That caused a lot of panic for nothing: images built with Docker still run fine, because they're OCI images. Only things that talked to the Docker socket on the node broke.

Security and Isolation

The big weakness never went away: all containers share the host kernel. A kernel exploit is a container escape. The answers so far:

  • gVisor: A user-space kernel that intercepts syscalls (Google, 2018)
  • Kata Containers: Each pod runs in a lightweight VM
  • Firecracker: MicroVMs from AWS, built for Lambda and Fargate
  • Security profiles: AppArmor, SELinux, seccomp, and dropping capabilities

Which is a little funny: after 40 years of getting away from VMs, the strongest isolation option is putting the VM back, just a much smaller one.


Wrapping up

The 40-year arc (chroot, jails, zones, namespaces, cgroups, LXC, Docker, OCI, Kubernetes) is mostly the same story told over and over: people kept reaching for "isolation that's lighter than a VM", and each generation made it more usable than the last. Docker didn't invent containers. It made them shippable to engineers who didn't already know what an LXC was. The lesson I take from it: user experience beat technical superiority. Solaris Zones had solid isolation and resource controls in 2005, and it didn't matter.

WebAssembly, Firecracker, and per-function microVMs are the obvious next chapter: same principles (portability, fast start, smaller blast radius) around different runtimes. Worth watching, but you don't need to chase any of them yet to ship containerised software in production today.

If you're standing this stack up for the first time, the history is useful for one practical reason: it tells you what each layer is actually for, which makes it a lot easier to know which one is the cause when something breaks.


A note on how this was written: I used AI to help with phrasing and structure. The tone, the opinions, the war stories, the code, and everything else here are mine.