2

According to my understanding of Operating Systems, the kernel of the OS is what defines its identity as an OS. But, docker container does not have a kernel of its own. It uses the kernel from the host OS.

So, my question is, when I say I'm running a Debian container, what exactly is it that makes it Debian, apart from the repository it uses? Or suppose I have two containers. One is Debian and the other is, say, Ubuntu. Now, what exactly is it that differentiates them besides the repo?

  • 2
    What's the difference between Debian and Ubuntu if you install them normally? Aside from the repos? After all they're both using the Linux Kernel? – Seth Jul 26 '18 at 6:30
  • @Seth But the raw Linux kernel is taken and then different flavour-specific patches and drivers are installed by the kernel team of that flavor. For example Canonical's Kernel team maintains Ubuntu Kernel. But the absense of these parameters in case of Docker makes it really difficult to judge the difference between OS for me and yet we have different images on Docker hub. – 7_R3X Jul 26 '18 at 6:46
  • Docker images don't have operating systems. This video has some great details about what's happening youtube.com/watch?v=gMpldbcMHuI – nijave Sep 12 '18 at 0:15
1

A Linux distribution is not its kernel. A kernel is needed, but a distribution works on a kernel.

A distribution is simply that, a particular way of distributing all the packages necessary to create a working system.

Generally this includes a package manager, and specific locations where packages are retrieved from.

Because there are many ways to put together a working system each distribution makes choices about base packages needed. One distribution might choose to use basePackage v1.1 while another uses packageBase v7.8. It might be that that the two packages provide broadly the same functionality but work in a subtly different way meaning that other parts of the system need tweaks or configuration to work with them.

There might be subtle differences in configuration files or filesystem layouts as well.

In this way a distribution is built up, making choices about packages, merging them together, massaging to make them fit and generally establishing a baseline set of support packages that can be expected on every system.

In theory you could compile a completely generic kernel with every module enabled and then drop it into any distribution. As long as the kernel provides the correct features required by the packages then it should just work. In practice it is a lot more difficult as system packages require specific kernel features and may not work if they are changed, which happens often with the Linux kernel, but the theory is there.

What makes a docker container one distribution over another is the same. It is how the distribution within it is tied together and configured.

0

container images are not VM'S at least not in the case of docker

they share the host kernel so the container OS is more a utility / packageing factor (apt/yum) then anything else.

there are abstractions where you can get a own kernel into a container but that came out of the clear container initiative that runs a light kvm

rkt to example can run that as stage 1 and give a more VM like isolation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.