Deep into Container — Linux Namespaces and Cgroups: What are containers made from?

Quân Huỳnh
4 min readJun 20, 2022

If we do DevOps, we are probably familiar with Kubernetes, Docker, and Containers. But have we ever wondered what the hell is docker? What are containers? Docker is a container? Docker is not a container and I will explain what it is in this post.

This is part one in the series Deep into Container:

  1. Linux Namespaces and Cgroups: What are containers made from?
  2. Deep into Container Runtime.
  3. How Kubernetes works with Container Runtime.
  4. Deep into Container — Build your own container with Golang.

Container

Containers are a technology that allows us to run the process in an independent environment with other processes on the same computer. So how does the container do that?

To do that, the container is built from a few new features of the Linux kernel, of which the two main features are “namespaces” and “cgroups”.

Linux Namespaces

This is a feature of Linux that allows us to create something as a virtual machine, quite similar to the function of virtual machine tools. This main feature makes our process completely separate from the other processes.

--

--

Quân Huỳnh

I’m a technical blogger and love writing. I write about Kubernetes, AWS Cloud, and Terraform.