Demystifying containers — what I learned in my docker/kubernetes journey ? Part 2

Nitin Rohidas
3 min readOct 15, 2022

--

In my previous article, we tried to demystify some concepts on Containers and we will be continuing to expand on our knowledge and go more deeper in to some more aspects.

The Internet is Confusing !!

Internet is confusing

Containers do not run on the Container Host on its own either i.e without any Docker support, at the same time, Containers do not run on the Docker layer as shown in some popular representations. Containers runs on the host operating system as it is just another Linux process and we use Docker for creating and launching containers.

A more appropriate representation of container architecture is the picture on the right. It shows both Docker and Containers running on the host machine. Docker basically helps to create (docker build) , store (docker push ) and run (docker run) & to interact with the containers in their running state like to examine the status of containers and to view logs etc. The right representation is the where we show Docker and containers both running on the Host Operating system. In my previous article, we saw how Docker uses Containerd and runC to spawn a container.

How is Containerd used in Docker Vs Kubernetes ??

This diagram beautifully explains the flow of control in Docker vs Kubernetes environment. As you can see, since Containerd implements the CRI interface, Kubelet calls the CRI Plugin to use the available container Runtime to launch a container. Containerd then uses runC to launch the container.

https://iximiuz.com/en/posts/containerd-command-line-clients/

Thanks to iximiuz.com for his great blogs which helps to learn containers in an easy manner.

What is runC ?

runC is Everywhere !!

runc is an OCI-compatible container runtime. It implements the OCI specification and runs the container processes.

runc provides all of the low-level functionality for containers, interacting with existing low-level Linux features, like namespaces and control groups. It uses these features to create and run container processes.

AUTHOR: KIRILL SHIRINKIN

DevOps and Infrastructure Consultant, Cloud, Kubernetes and OpenShift Expert, Platform Builder, Writer, Software Developer.

AUTHOR: KIRILL SHIRINKIN

DevOps and Infrastructure Consultant, Cloud, Kubernetes and OpenShift Expert, Platform Builder, Writer, Software Developer.

As you can see, the crucial job of creating the container is with runC. runC is the most widely used container runtime, but there are others OCI compliant runtimes, such as crun, railcar, and katacontainers. Docker, CRI-O, and many other Container Engines rely on runc.

Hope you got to learn with me and I was able t share my learning in an easy way for newbies to understand. Give me a clap, if you have liked the post !!

References :

http://crunchtools.com/containers-dont-run-on-docker/

--

--

Nitin Rohidas
Nitin Rohidas

Written by Nitin Rohidas

Software Architect by profession, Tech Enthusiast, Spiritual aspirant, loves to write & exploring new areas of interest — writing, psychology, philosophy.

No responses yet