Reputation: 9649
Docker container can be hosted on Linux boxes, but I'd like to make certain what kind of container can sit on the specific host from the matrix below:
kernel-version distro-type parity-check
host x y
container-type-A x y ok
B < x y ok
C > x y ?
D x z ?
E < x z ?
F > x z ?
I could reason to conclude the parity for type-A and B, but how about the rest?
(I know the container shares the host kernel, and container base images are essentially file systems extracted from distros or even self created.)
Upvotes: 0
Views: 130
Reputation: 61
All containers running on a host actually are using kernel of underlying host. So the kernel of container doesn't matter in most of cases (it may matter in cases where you are relying on some specific behavior of kernel. See example #2)
Example #1: HOST OS : Ubuntu 14.04.1 (kernel 3.13.0-45) Container image :say CentOS 5.11, RHEL 5.11 (which houses kernel 2.6.18-398)
Any process executed in the container (of CentOS 5.11) will actually be run in context of underlying kernel 3.13.0-45 !
There is no separate OS/kernel running for Container (in above case kernel 2.6.18-398 doesn't run at all).
This is actually the reason your container boots instantly (it doesn't run any additional kernel.) The process is spawned in context of underlying kernel and can be seen in top command run on host OS.
Example (#2) : a case where the container will most probably not work: You are trying to use some specific kernel modules in container that are not available in underlying kernel !
Upvotes: 1
Reputation: 12190
The container doesn't see or care about the distro on the host, so that whole column is irrelevant.
If the application in the container requires a feature from the kernel that isn't on the kernel you are running, then 'n', otherwise 'y'.
Upvotes: 2