0

I use Elasticsearch via Docker, and I see that the recent version of the Elasticsearch (7.13.2) Docker image uses centos:8 as the base image.

Is it possible/a good idea to run Docker containers with a base image that is different to the operating system on which Docker Engine is installed? for example:

  1. Install Docker Engine on CentOS 7.6 (or Ubuntu 20.04)
  2. Start a Docker container from an image based on Centos 8

If this works, is there anything I should be aware of?

Looking at this Stack Overflow answer, it would seem to me that this shouldn't be a problem so long as the Linux kernel versions are the same between the base image and the OS. But I assume that is not the case for CentOS 7.6 vs CentOS 8.

What would be the concern WRT to a mismatched Linux kernel version for a Docker container's base image vs the OS?

Zach Smith
  • 8,458
  • 13
  • 59
  • 133
  • It seems like a reasonable answer... I take it to mean that it may or may not work depending on what the image is. So it's much better to use use a matched kernel version – Zach Smith Jun 15 '21 at 08:07
  • Yeah, it takes [years](https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.5-Kills-SYSCTL-SYSCALL) for a deprecated system call to actually get removed, so for most purposes, this should be a non-issue – Martheen Jun 15 '21 at 09:36
  • The container doesn't have its own kernel, so there's no "matching" there. – David Maze Jun 15 '21 at 11:42
  • A match between the version specified in the base image, and the os version. – Zach Smith Jun 15 '21 at 14:47

0 Answers0