Build a Container from Scratch in Go (Liz Rice GOTO 2018)
Follow along with Liz Rice's classic GOTO 2018 presentation and build your own container runtime in under 100 lines of Go using Linux namespaces, chroot, and cgroups.

Explore tutorials, challenges, courses, and more published by this author.
Follow along with Liz Rice's classic GOTO 2018 presentation and build your own container runtime in under 100 lines of Go using Linux namespaces, chroot, and cgroups.

Understand how the chroot system call changes the root directory for a process, learn how dynamic linkers resolve dependencies inside a jail, and see what an isolated process perceives as its filesystem root.

Discover how Go functions under the hood as a modern systems programming language. Learn how Go makes system calls directly, resulting in self-contained binaries that have no libc dependencies.

Explore Linux/Unix signals in Go, how signals act as asynchronous notifications, who can send them, default kernel behaviors, sending signals with kill and Go, graceful signal handling with os/signal, and why SIGKILL cannot be trapped.

Explore what a thread actually is in Linux, how threads relate to processes, how the Linux kernel treats both as tasks (task_struct), and how kernel scheduling enables concurrency.

Explore what a program is, when it actually becomes a process and how the Linux scheduler manages process execution.

Export an Alpine container rootfs using crane, set up a chroot environment, and execute a musl-linked binary that fails to run on the host system.
A stubborn process is running on the system, kill it :)
Refactor a slow, single-threaded C file downloader that fetches files sequentially into a multi-threaded program using POSIX Threads (pthreads) to achieve concurrent downloads.
Write a C program that calls fork() to clone a process and execve() to execute a command, then print and retrieve the child process PID.
Produce a valid ELF binary that runs and exits cleanly, but does not define a main() function.
Compile a small C loop with -O2 -S, inspect the generated assembly, report how many add instructions gcc produced and see how much it has optimized the equasion.