-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Containerization #1
Comments
What in the world is a container?This is a question we all have, because of the nature of containers, it is very hard to explain to a starter what actually that is, but no panic... Let's figure it together! In a couple of words, a container is an isolated process that get his own share of namespaces and resources, just like another machine would, but in reality, it uses the same kernel and resources that the host does. So a container is just a process, that thinks to be a host by itself. The difference between a container and a virtual machine is that a VM also uses his own namespaces and resources, but it also uses his own kernel and emulate his own resources, instead of borrow from the host. That makes container so light weight, because they are just proccess, it is like running a normal application, but on a container which feels like another machine. That is thanks the linux kernel, in 1979 on Unix Version 7 it is born the chroot command, this command allow us to make any folder on our filesystem become the root of the system for that process. That makes an isolation on a FS side. There is also other features from the kernel which is the Namespace and Cgroup that helps to isolate the rest. Creating a perfect container with everything it needs to think it's his own separeted machine. That's why containers are so much faster on a linux machine. In order to make this work on windoes and mac we need to create a linux VM first so we can start upon its kernel. On linux we can run natively, without installing anything else, we can actually do it now, on this repository, stick arount to see it coming to life. After container became so popular, one of the biggest in the area, Docker created the OCI which creates some specification for all the containers runtimes to follow. With this is born RunC and ContainerD (which is not a runtime like RunC because it runs on top of RunC, but... ). The latest is used from Docker to run its thing, but others like Kubernets and Podman uses RunC. Therefore, we are here to learn the kernel features, how does it works beneath all of this! Let's create our own What are the isolations we can make with linux kernel?
|
Example on how to create a containerCreating a container from scratch is simple as changing directory, that's the magic behing
|
https://youtu.be/JOsWB50LmwQ?si=bWr5ACo2Df_PRgTF Good talk about containerization https://youtu.be/sK5i-N34im8?si=sLXZcOsW9kROCoIG This is like the juice of what is a container |
Explains how containarization works and the beatiful world of the
chroot
!The text was updated successfully, but these errors were encountered: