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

Channel:GopherCon UK · Length:23:00 · Published:2016-09-10 · Views:32815

Watch on YouTube

Summary

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.

Why HN recommends it

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

have given talks on how to make containers from scratch that are very illuminating — HN, 2019

C, C++, Rust, Go & systems languages · Operating systems & kernels · Cloud, DevOps & reliability

Subtitles (excerpt)

so my name is Liz I am a co-founder of a startup called micros scaling systems and we're building some tools around containers can I have a quick show of hands how many people are using containers oh loads that's great um actually can you put your hands up if you're using containers but not Docker oh like yeah okay fine fine so let's just have a show of hands if you are using containers or even if you're not using containers and you think you've got a really clear grasp of what a container actually is what does it mean to run a container we should know great um yes so a few of you but I um until I saw a marvelous talk by the very wonderful Julian fredman I felt like I had an extremely shaky grasp of what a container is you know you hear people say things like it's a lightweight virtual machine and you think what does that mean or you get people go oh it's just jails and name spaces and c groups and I don't know what you mean what what does it mean and then I went to this fantastic talk by Julian uh he has given me permission to copy it cuz I am basically stealing it um it was so good I went home kind of wrote the code myself explored it and thought yeah I have to share this with other people so basically all the kind of

On Hacker News

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, not… — hardwaresofton, 2019-05
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 -> [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: [LIN… — hardwaresofton, 2018-04
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: [VIDEO] — hardwaresofton, 2017-12
I started by watching [VIDEO] and reading [LINK] Also "man namespaces" on a linux machine will give some deeper documentation. — archevel, 2016-12
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. D… — e1g, 2016-10

Related videos