Learning Materials

<aside> 💡

This note is my study summary from Liz Rice’s online course. I highly recommend going through the following content first, and then using this note to reinforce and deepen your understanding of the related topics.

</aside>

My Source Code

You can get the complete sample code from my repo below

https://github.com/baconYao/container-from-scratch-golang

Our Targets

As Liz Rice mentions in each lesson, our goal is to mimic Docker’s run command so that an application can run in an environment isolated from the host (aka a container). However, note that we won’t be pulling a public image—instead, we’ll use the Ubuntu 24.04 rootfs as the container’s file system.

Therefore, we’ll use Golang to build a small program that provides a capability similar to docker run.

Capture from Liz Rice’s materials

Capture from Liz Rice’s materials

As we enhance the functionality of our small program, we will explore the following topics, allowing us to create a basic simulation of a non-production container environment.

  1. UTS Namespace
  2. Chroot
  3. PID Namespace
  4. Mount Namespace