Infrastructure 2023-06-05

Container Technology Explained: How Docker and OCI Containers Work

Learn how container technology works—namespaces, cgroups, OCI standards—and why containers have become essential for modern application deployment.

Read in: ja
Container Technology Explained: How Docker and OCI Containers Work

Overview

A summary of container technology. Experimenting with creating and interacting with containers without using Docker.

What is a Container

History of Containers

1979: chroot introduced in UNIX OS.

2000: FreeBSD jails appeared in FreeBSD 4.0, an evolution of chroot.

2001: Technology forming the basis of Linux containers appeared in Linux through the VServer Project.

2004: LXC 1.0 released. Linux Containers

2008: Docker emerged.

Besides the above, container technologies like Virtuozzo, OpenVZ, HP-UX Container, and Solaris Container also exist.

Differences Between Containers and Virtualization

A rough summary is also available at bmf-tech - What is Docker.

Linux Kernel Features for Realizing Container Technology

Kernel namespaces

Apparmor and SELinux profiles

Seccomp policies

Chroots (using pivot_root)

Kernel capabilities

CGroups (control groups)

Docker's Container Technology

Previously, Docker used lxc, but from v0.9, it seems to use libcontainer implemented in Go. (cf. Docker blog - DOCKER 0.9: INTRODUCING EXECUTION DRIVERS AND LIBCONTAINER github - opencontainers/runc/libcontainer/)

Standard Specifications

OCI (Open Container Initiative)

The Open Container Initiative is an organization aimed at creating industry standards for containers and runtimes.

It defines the following specifications:

OCI is involved in the specifications of low-level runtimes. Examples: runC, gVisor, Kata Containers, Nabla Containers, etc.

CRI (Container Runtime Interface)

CRI defines the interface for communication between kubelet and container runtime.

CRI is involved in the specifications of high-level runtimes. Examples: docker, containerd, cri-o

Summary

Gave a Lightning Talk

Gave a lightning talk at Makuake LT Party (an internal LT event).

speaker-deck - Fully Understanding Containers

References

Tags: Docker libcontainer lxc lxd Container
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles