Docker allows the host Linux distribution to be different from the guest Linux distribution.
Are there limits to this compatibility? Could you run a recent Ubuntu guest in a host whose kernel is much older?
Docker container packages are self-contained and can run applications in any environment, and since they don't need a guest OS, they can be easily ported across different platforms.
You can run both Linux and Windows programs and executables in Docker containers. The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.
Container Runtime The Open Containers Initiative (OCI) Runtime Standard reference implementation is runc. This is the most widely used container runtime, but there are others OCI compliant runtimes, such as crun, railcar, and katacontainers. Docker, CRI-O, and many other Container Engines rely on runc.
According to Docker, a container is ” a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it.” And since containers are platform-independent, Docker can run across both Windows- and Linux-based platforms.
Docker allows the host Linux distribution to be different from the guest Linux distribution.
To make things clear, there is no guest Linux distribution when running a Docker container. The Docker container is not a Linux OS.
Docker images such as ubuntu, centos, ... are not operating systems. They are just images that "mimic" an OS distribution from the point that they have a very similar filesystem structure and tools available that you typically find on an OS distro like Ubuntu or Centos. Those images do not have their own kernel packaged inside.
If you are wondering whether you can run the Docker image ubuntu:16.04
on a machine with ubuntu:14.04
the answer is yes. In addition, there shouldn't be any compatibility problems in general with other images.
Now since the kernel is not part of the image, it is possible to create a Docker image that would work on one kernel version and fail on another. For instance, you can request a system call that might not exist in an older kernel version.
However, this problem is not caused by docker, but rather is a compatibility issue with the software running inside the container.
Finally, if you are running Docker on a machine you will at minimum have a kernel version of 3.10 which is not very old. So it is unlikely to encounter any such limitations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With