Tutorial: Using Linux Primitives to Build Your Own Containers
summary
Step-by-step build of a container from kernel primitives: create user namespaces and remap UIDs so root inside ≠ root outside, unshare mount and pivot_root to give a new filesystem view, apply seccomp notifier to block or emulate dangerous syscalls (demoed by blocking mknod), drop capabilities, load an LSM profile (AppArmor) and enforce resource limits with cgroups (v1 vs cgroup v2 incompatibility shown). Demos prove ordering matters, unprivileged containers work without host escapes unless a kernel bug exists, and the mknod interception lets safe device access.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 4:37General Considerations
- 6:17File System Isolation
- 10:53namespaces
- 21:38seccomp
- 28:08Demo
- 32:03Capabilities
- 37:53User Namespace
- 45:03Loading Profiles
- 48:16C Groups
- 55:51Proxy Groups
related talks
01h 32mContainers – A Look Under the Hood
33mLinux Container Internals
48mState of Linux Kernel Container Features
42mSecuring Filesystem Images for Unprivileged Containers
31mLet's Build And Break A Container By Hand Without Docker Or LXC
23mLife of a Container
50mUnderstanding Linux Containers by Building One from Scratch
39mContainers are Linux - but what does it mean?
