When we generate a docker container, are we lifting a linux virtual machine in the background?

1

Is a container necessarily attached to a virtual machine, or is it independent?

    
asked by anonymous 11.06.2018 / 19:24

2 answers

3

When we say "are we raising a linux virtual machine in the background?" if you are asking if docker creates a complete virtual marquee running a linux kernel itself and the application itself is not.

What really happens is that docker uses some linux kernel directives like namespaces to isolate the execution of a container from the rest of the system, but all containers run directly on the host kernel.

It is worth mentioning that this information is true only in linux-based systems, in a Windows, for example, docker actually raises a linux virtual machine and executes all its containers on the same VM separating the execution of each container using the same namespace strategy etc.

These links can help you better understand the subject:

link

link

link

    
20.06.2018 / 17:10
0

Although the container has the structure and appearance of a VM, its purpose is to run only one process. If you need to run a nginx, for example, only the process will run inside the container. In this way, it is possible to test tools without the need for OS installations. Keep in mind that the purpose of the container is process.

    
12.06.2018 / 16:21