If you like my article, feel free to give me a like and share my post on Linkedin → https://www.linkedin.com/feed/update/urn:li:activity:7370063234709581825/

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

Online Practice Machine

截圖 2026-01-01 晚上8.06.53.png

I’ll be using the iximiuz Golang environment in this post, making it easier for readers to follow the exercises.

Give it a shot: https://labs.iximiuz.com/playgrounds/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