How to write a container daemon in Python
summary
Claims a working container daemon implemented in ~140 lines of Python that pulls Docker tar layers and extracts them into a unionfs root, uses subprocess preexec_fn to chroot and set up namespaces, moves veth into a new netns and adds routes, and applies cgroups limits (50% CPU, 500MB). Uses NSenter to run inside namespaces and pyroute2 to create interfaces, spawns nginx (1.11) and verifies with curl; prototype works but lacks many Docker features and is flaky.
AI-written summary · about
chapters (7)
- 0:00Writing a container daemon
- 2:10Why Docker in Python
- 7:13Python packages for kernel
- 14:12Building container from scratch
- 18:14Live demo of daemon
- 21:53Lessons learned and limits
- 24:28Closing and Q&A
related talks
26mHow to containerize Python applications with Docker
20mExtend Docker using Python
27mDocker + Python
19mDocker as a replacement for virtualenv
02h 28mWorkshop: Learn How to Dockerize Your Python Application
30mHow to Create a Great Local Python Development Environment with Docker
34mDockerizing Django
23mCleaning Up Your Python Environment Superfund Site
