CSE Roadmap

Common tier · about 3 hours · 7 parts

Part 1 of 7 · 1 min read

Why this page comes last

In this module you will

  • Build a minimal container from a root directory, four namespaces and a control group, and run it.
  • Compare a container with a virtual machine on start time, size, isolation and shared parts.
  • Show with commands that a container shares the host kernel.
  • Explain image layers with an overlay file system, and what a whiteout is.
  • List what Docker-style tools add to this base, and which risks remain.

Pages 1 to 3 built a virtual machine from a hypervisor, page 4 gave a process its own view, and page 5 limited its use. This page puts the parts of Levels 9 to 11 together in one small program and asks what a container really is. It uses the file view of Level 9, the rights and filters of Level 10, and the namespaces and cgroups of pages 4 and 5. After this page, Level 12 turns to the day-to-day use of Linux and to interview practice.

About this example About this example

Real: The program (31 lines) was compiled with gcc -Wall -Wextra and run as root on the Linux test machine (kernel 6.18). The root directory was built by copying six programs and their libraries from the host, 7.7 MB in total. All outputs, the start times and the overlay test are real.

Scripted: The container host name tiny, the story of an operator who wants to know what a container is, and the file names app.conf and base.txt are made up to give the work a shape.

Not real: This container has no network connection (only loopback), no user namespace, no capability drop and no seccomp filter, so it is not safe for untrusted code. It is a teaching model. A real tool adds those, an image format and a registry.