I would like to know how the Docker containers are managed by the operating system. I could find some explanations here: https://stackoverflow.com/a/47784145/11377751, but I can not understand well.
I know the basics of the operating system (notions about PCB, ram, CPU, kernel, syscall, etc.).
But I do not understand how the containers are managed by the OS:
- Are containers processes or are they "emulated" by the Docker Engine (which would be the only process, with its threads)? How can I represent a container in the ram ?
- If, in my container, I launch a C application that contains "fork();", who makes the call to the kernel: the container or the Docker Engine? Who duplicates the pcb ? Or a "malloc (..);"?
- What is the concept of namespace in the kernel? in the ram? Are these tables that define access rights or something? Why does wikipedia say that this notion is essential for containers, knowing that in schemas Docker Engine is represented between containers and the kernel?
image :
This is an image I found here : https://stackoverflow.com/a/42111368/11377751
thank you very much in advance