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.