What is a container, really? Let's write one in Go from scratch
summary
Claims a real container is just a process with isolated views of the system and builds one live in ~100 lines of Go. Code runs on Linux, uses clone flags to create new PID namespace and a new UTS/hostname namespace, fork‑execs itself to produce PID 1, mounts a separate root filesystem and /proc so ps shows only container processes, and leaves cgroups for resource limits. The demo completes in about 20 minutes on a VM and produces a working, minimal container.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 2:05Running containers
- 3:45Coding
- 7:40Executing
- 8:45Name spacing
- 10:35Process IDs
- 11:25Printing Process IDs
- 13:55Running inside a container
- 14:50Creating a new file system
related talks
22mWriting a Container Runtime in Go
24mWrite your own container, for fun and no profit!
37mDocker without docker- understanding the basics
23mLife of a Container
33mLinux Container Internals
01h 32mContainers – A Look Under the Hood
39mContainers are Linux - but what does it mean?
48mUnderstanding Container Engines by Demo™
