In docker, some questions about the relationship between each mirror and my physical machine

  docker, question

Recently studying docker, we know that there are various mirrors in docker, such as ubuntu, centos, and other application-level mirrors such as nginx and redis. I used the docker inspect command to check the nginx image and found this paragraph:

"Architecture": "amd64",
 "Os": "linux",
 "Size": 108664124,
 "VirtualSize": 108664124,

First of all, I’m mac.
Is this “Os”: “linux” the system kernel of my physical machine?
If so, then nginx images share the system kernel of my physical machine, then the problem arises. Are linux kernels included in the images of operating systems such as ubuntu and centos? Or how?

Tell me about my shallow knowledge, please correct me.

The Nginx container you are running is not the kernel of your host computer (mac), because docker depends on it.namespacescgroupsThe function of does not exist on your host computer. You can run the docker container on the mac because of a man namedDocker.appThe program of provides a layer of abstraction, which is between the host and docker, and provides the Linux that the container depends onnamespacescgroupsOther functions.

Each docker container running on Linux really shares the Linux kernel, but each docker container running on mac does not share the mac kernel. From another angle, the source code of docker is cloned from github and compiled. The compiled binary program cannot run directly on mac.

Docker images such as ubuntu do not include the Linux kernel. On the other hand, if the Linux kernel is included, the size of the image must be more than that.