Cgroups, namespaces, and beyond: what are containers made from?
Docker4 HN recommenders · recommended in 3 months, 2017–2023
talk · intermediate · evergreen · 2017–2023 on HN
Jérôme Petazzoni explains how Linux containers are built from kernel features like cgroups, namespaces and SELinux. He demonstrates putting the pieces together by hand to make a container and compares runtimes and approaches like jails and zones.
HN recommends it as a talk that makes containers click, showing that containerization is not virtualization and demystifying what Docker does.
Up next
9 mo on HNLISA11 - Fork Yeah! The Rise and Development of illumos
USENIX
9 HN recommender · 2012–2026
4 mo on HNDr. Satchin Panda on Time-Restricted Feeding and Its Effects on Obesity, Muscle Mass & Heart Health
FoundMyFitness
5 HN recommender · 2017–2018
5 mo on HNClojure Concurrency - Rich Hickey
ClojureTV
5 HN recommender · 2013–2023
10 mo on HNEffective Programs - 10 Years of Clojure - Rich Hickey
ClojureTV
10 HN recommender · 2017–2026
4 mo on HNLecture 19: Dynamic Programming I: Fibonacci, Shortest Paths
MIT OpenCourseWare
4 HN recommender · 2016–2021
3 mo on HNCRDTs and the Quest for Distributed Consistency
InfoQ
3 HN recommender · 2018–2020
2 mo on HNContainer Hacks and Fun Images
Jessie Frazelle
2 HN recommender · 2019–2022
2 mo on HNNetdev 0x16 - Keynote: It's Time to Replace TCP in the Datacenter
netdevconf
2 HN recommender · 2023–2023
14 mo on HNThe Tragedy of systemd
linux.conf.au
16 HN recommender · 2019–2025
11 mo on HNThe Thirty Million Line Problem
Molly Rocket
11 HN recommender · 2018–2024
10 mo on HNVCF East: Ken Thompson interviewed by Brian Kernighan
Vintage Computer Federation
11 HN recommender · 2019–2025
9 mo on HNUSENIX ATC '21/OSDI '21 Joint Keynote Address-It's Time for Operating Systems to Rediscover Hardware
USENIX
12 HN recommender · 2021–2026
5 comments from Hacker News
This topic is perfectly covered in a presentation by Jérôme Petazzoni from Dockercon 2015, a Docker developer, on how containerization works. After watching the video, I began to clearly understand that this is not virtualization at all, as many at first imagine. ▶ this video
I watched this talk couple of years ago that made docker/containers finally click for me. Cgroups, namespaces, and beyond: what are containers made from? - Jérôme Petazzoni, ▶ this video
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 -> link Cgroups, Namespaces and beyond: What are containers made from (Jerome Petazzoni) @ DockerCon 2015 - ▶ this video 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.
Jérôme Petazzoni's talk on cgroups, namespaces, etc. I think he has given the talk a bunch of times, I saw it in person once, here is a video I found: ▶ this video He goes into cgroups, namespaces, etc. Then does a demo where is manually does what docker does, like untars an image, creates namespaces, creates the networking.
>There is controversy about Docker not running on FreeBSD but I believe (like many others) that FreeBSD has a more powerful tool. Jails are older and more mature - and by far - than any containerization solution on Linux. If FreeBSD jails and Solaris zones were equivalent to Linux containers, we'd have seen them take over the backend already. We haven't. They're really useful, they provided a degree of safety and peace of mind for multi-tenancy but they're not granular enough for what's done with $CONTAINER_RUNTIME these days. Jérôme Petazzoni has an old talk where he touches upon container primitives and compared them to jails : ▶ this video