What operating system is docker?

after looking at the figure below, I feel that docker is a process running on the host operating system, so what operating system is the software based on after installing mysql, python directly in docker? Is it a host-based system? But it seems that if you install any redis image on windows, you will find that it is not the windows operating system of the host.
so
question 1: what operating system is docker itself? if you download a redis image of docker, it seems that you can execute some linux commands after entering it?
question 2: after installing an operating system such as centos on docker, a docker process is running on the host system. There is a centos system running in it. Is that correct?

clipboard.png

Nov.11,2021

question 1: what operating system is docker itself? if you download a redis image of docker, it seems that you can execute some linux commands after entering it?

docker is not an operating system. Your figure 2 is very clear, there is only one HOST OS. This means that all docker containers are the OS of the host used. This is completely different from the fact that Virtual Machine virtualizes Guest. You can try it, assuming that your host is Ubuntu 16.04, and the kernel version is 4.9. No matter which version of the ubuntu/centOS container you run, the kernel version is 4.9.

sharing Host OS is a feature of docker! Sharing Host OS is a feature of docker! Sharing Host OS is a feature of docker!

compared to Virtual Machine virtualization, Docker is lighter and smaller (after all, there is no need to start a set of kernels anymore)

but of course there are limitations, such as Virtual Machine can be Windown on Linux or vice versa, and Docker is not.

question 2: after installing an operating system such as centos on docker, that is, a docker process is running on the host system, and the centos system is running in
.

No, the kernel used is always HOST OS. The docker daemon process exists and is unique on the host. You should be talking about starting CentOS Container, which will start a process (a normal process for HOST and an init process for Container. For this, please refer to PID namespace)

).

answer 1:docker is not an operating system. Docker is a container, which can be compared to virtual hardware. Install the operating system on the hardware (host). The image of redis must be a system with redis, installed. Not only a redis, can enter the image and use relevant commands to view system information.
answer 2: it can be understood that docker is a container. As to whether docker is a single process, you can check more detailed information or check the official documentation and source code.


docker is a container, just like your computer. Container for the system

Menu