Golang UK Conf. 2016 - Liz Rice - What is a container, really? Let's write one in Go from scratch

GopherCon UK · 32K views · 2016 · 23:00

Open on YouTube

C, C++, Rust, Go & systems languagesOperating systems & kernelsCloud, DevOps & reliabilitytalk

Why Hacker News recommends it

HN recommends it as an accessible way to remove the magic from Docker and understand how containers work.

What it is

Liz Rice builds a container from scratch in about 100 lines of Go, showing that a container is not a lightweight VM but a set of Linux kernel features and flags.

Recommended by 3 HN commenters across 5 different months, 2016 to 2019.

What Hacker News said

Recommends e1g · 2016-10 · on “Dropping Linux capabilities to improve container security”

The core philosophy of "one app per container" has not changed. Strictly speaking, this will never change because containers - whether Docker, ACI, or OCI - are processes and not VMs . I recommend this accessible presentation on how to write a poor-mans Docker by hand[1] to remove some of the magic behind containers. As with any philosophy, there are many smart people who hold an opposite view. Docker itself is perhaps deviating from the architectural simplicity of container==process, while the underdog rkt is enforcing this approach even at the cost of user-land usability (e.g. rkt cannot run containers as daemons by itself). In practice, most containers must have an OS wrapping the applica

Recommends archevel · 2016-12 · on “Linux Container Internals”

I started by watching [this video] and reading [LINK] Also "man namespaces" on a linux machine will give some deeper documentation.

Recommends hardwaresofton · 2017-12 · on “Ask HN: Good resources on learning how docker works under the hood?”

Super late to this thread but the best video I've ever seen on how docker/containers work is this one: Jessica Frazelle's (docker core maintainer) talk on how to build containers in pure bash and C: [LINK] There's also this one, which is similar: [this video]

Recommends hardwaresofton · 2018-04 · on “A Workshop on Linux Containers: Rebuild Docker from Scratch”

In the same vein: Building a container from scratch in Go (Liz Rice) @ Container Camp 2016 -> [LINK] What's a container really let's write one in go from sctach (Liz Rice) @ Golang UK Conference -> [this video] Cgroups, Namespaces and beyond: What are containers made from (Jerome Petazzoni) @ DockerCon 2015 - [LINK] Building Containers in Pure Bash and C (Jessica Frazelle) @ ContainerSummit 2016: [LINK] First two are basically the same talk, but it doesn't hurt to hear the same ideas more than once.

Recommends hardwaresofton · 2019-05 · on “Billions wasted on Hadoop startups, the same will eventually be true of Docker”

This is precisely why I said the fact that someone would gloss over this is a red flag. The point is super critical . VMs are literally so hard to do correctly and in a performant fashion that parts of CPU instruction sets[0], and kernel subsystems (KVM[1]) were created to make them easier to run. Containers, in contrast are literally a few flags and a bunch of in-kernel antics. A few people, notably Liz Rice and Jessie Frazelle have given talks on how to make containers from scratch that are very illuminating for those that are interested: [this video] [LINK] [0]: [LINK] [1]: [LINK]