A meetup talk on the evolution of the Docker engine from 2014-2019, including the refactoring and spin out of OCI runc and CNCF containerd codebases. This talk was given at the Docker London meetup group on Thursday, 31st January, 2019.
7. 2.
The OCI & runc
Container execution grows
up into a standard
8. & runC
> Announced June 20th, 2015
> Charter signed on
December 8th, 2015
> 44 member companies
> Both specifications
reached 1.0 June 2017
https://opencontainers.org
https://github.com/opencontainers
> runc is a client wrapper around libcontainer
> libcontainer is the OS level interface for containers
> OCI spec covers Solaris, Linux, & MS Windows
$ docker run -it --read-only
-v /host:/hostpath
alpine sh
/#
{
"ociVersion": "1.0.0",
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": true,
"args": [
"sh"
],
"env": [
"PATH=/usr/sbin:/usr/local/bin:/bin”
config.json
• A Linux Foundation Collaborative Project
• Free from control by any particular vendor’s specific cloud stack or ecosystem
• Includes a specification, reference runtime* and now, a specified image format
*seeded with runc + libcontainer by Docker
8
9. runC
Created in June 2015
> 17 releases (1.0.0-rc5 currently)
> 243 contributors
> OCI maintained/governance
> Used by Docker, containerd, cri-o,
garden-runc/Guardian, BuildKit, etc.
▪ Runc is a client wrapper around the pre-existing libcontainer library
project
▪ Runc is one implementation of the OCI runtime specification
▪ Scope of runc is clearly limited by OCI charter: no networking,
image handling/resolution, storage support
▪ Enablement of low-level OS features happen here: ambient caps,
rootless containers, new cgroup support, and so on
▪ Daemon-less operation; wrapping code must handle any broader
node and cluster level container mgmt.
9
11. runc
containerd
Why Containerd 1.0?
▪ Continue projects spun out
from monolithic Docker engine
▪ Expected use beyond Docker
engine (Kubernetes CRI)
▪ Donation to foundation for
broad industry collaboration
▫ Similar to runc/libcontainer
and the OCI
12. Created in December 2015
> 57 releases (1.2.2 currently)
> 165 contributors
> Docker created; now a CNCF project
> Used by Docker, Kubernetes, Cloud
Foundry, BuildKit, LinuxKit, and others
▪ Launched initially in December 2015 (included in Docker 1Q2016)
▪ Two streams of activity:
▫ “0.2.x” branch: used in former Docker releases as a simple runc
manager (up until 17.11)
▫ “1.0.0” branch: based on the December 2016 announcement,
contributed to CNCF
▪ Executes containers using the OCI runc executor; containerd
manages state/metadata, image & registry interactions, snapshot
drivers (overlay, btrfs, others)
▪ Supports Linux on several architectures; Windows support in 1.2.x
12
13. Metadata Content Snapshotter
Runtime
Linux (shim)
OCI runC
IMAGE TASK CONTAINER
Client library (Golang)
{ or }
▪ Metrics API &
Prometheus support
▪ OCI runtime and
image support
▪ Clean API and
abstractions
▪ Pluggable runtime
support (used by
VMWare impl.)
▪ Namespace support
(administrative/soft
multi-tenancy)
13
19. • As a core component of every release of Docker engine since early 2016,
and the CNCF containerd 1.0 branch since December 2017, containerd
has received significant production usage. Now in 2018 we see
containerd used in two public cloud managed Kubernetes offerings (GKE
and IBM Cloud IKS), and a long list of additional adopters found in the
TOC graduation proposal PR
Rio project
Users
20. Kubernetes; Container Orchestrator
▪ Kubernetes has no code to execute or run
containers on Linux or Windows
▪ Initially the Kubernetes node daemon ( the
“kubelet”) had direct linkage to the Docker
engine
20
kubelet dockershim dockerd
containerd
runc
https://github.com/kubernetes/kubernetes/tree/release-1.4/pkg/kubelet/dockershim