Matched between Docker container and Linux host?

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?

  • Should I make a service for shared Docker dependencies?
  • Docker curl: (7) Failed to connect to localhost port 80: Connection refused
  • AWS ECS container can't specify a region
  • Revert changes to docker container
  • Docker compose scaling down and Consul
  • how does docker net=host handle port conflict
  • (I know the container shares the host kernel, and container base images are essentially file systems extracted from distros or even self created.)

  • How to modify docker image config which got from inspect command
  • What is the simplest way to install Redis in Docker+Vagrant
  • how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker
  • How can I use the internal ip adress of a container as an environment variable in Docker
  • Auto-synch data in container upon changes in host
  • Running a docker-compose “Getting Started” example causes “Invalid volume specification” on Windows
  • 2 Solutions collect form web for “Matched between Docker container and Linux host?”

    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’.

    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 !

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.