How kundan0302200-cloud/boxforge works
BoxForge is an educational Linux container runtime. A user invokes run directly or through its interactive shell; the CLI builds container configuration and calls the runtime, which clones a namespaced child. The child configures namespaces and an isolated root filesystem, initializes lifecycle handling, then executes the requested command. The parent applies cgroup limits, waits for the child, and removes the cgroup. The README also identifies a BusyBox rootfs helper. Advanced features such as exec and OverlayFS are planned, not current runtime components. Edges follow shown calls or README statements; unsampled behavior is not inferred.
Main entry points: container.c Container Runner · filesystem.c Root Filesystem Setup · cgroup.c Resource Limits · lifecycle.c Lifecycle Handling
Components 11
Command Interface
- Run CLI
src/main.c
Container Isolation
- Container Runner
src/container.c - Namespace Setup
src/namespaces.c - Root Filesystem Setup
src/filesystem.c
Runtime Resources
- Lifecycle Handling
src/lifecycle.c - Resource Limits
src/cgroup.c - Limit Parsing
src/utils.c
Guest Environment
- BusyBox Rootfs
rootfs/busybox
Other components
- Operator
- Linux Kernel
- Container Command
Connections 14
- Operator → Run CLI: invokes
README.md - Run CLI → Container Runner: starts run
src/main.c - Container Runner → Namespace Setup: sets up
src/container.c - Container Runner → Root Filesystem Setup: sets up
src/container.c - Container Runner → Lifecycle Handling: initializes
src/container.c - Container Runner → Container Command: executes
src/container.c - Container Runner → Resource Limits: creates and removes
src/container.c - Container Runner → Lifecycle Handling: waits for child
src/container.c - Resource Limits → Limit Parsing: parses limits
src/cgroup.c - Namespace Setup → Linux Kernel: configures namespaces
src/namespaces.c - Root Filesystem Setup → BusyBox Rootfs: pivots into
src/filesystem.c - Root Filesystem Setup → Linux Kernel: mounts proc
src/filesystem.c - Resource Limits → Linux Kernel: writes limits
src/cgroup.c - Lifecycle Handling → Linux Kernel: waits for child
src/lifecycle.c