How does Docker handle different kernel versions?

后端 未结 3 1695
鱼传尺愫
鱼传尺愫 2020-12-16 22:19

Let\'s say that I make an image for an OS that uses a kernel of version 10. What behavior does Docker exhibit if I run a container for that image on a host OS running a kern

3条回答
  •  甜味超标
    2020-12-16 22:57

    This sounds like it doesn't matter what kernel version the host is running beyond that minimum. Is this true?

    As long as your kernel meets Docker's minimum requirements (which mostly involve having the necessary APIs to support the isolated execution environment that Docker sets up for each container), Docker doesn't really care what kernel you're running.

    In many way, this isn't entirely a Docker question: for the most part, user-space tools aren't tied particularly tightly to specific kernel versions. This isn't unilaterally true; there are some tools that by design interact with a very specific kernel version, or that can take advantage of APIs in recent kernel versions for improved performance, but for the most part your web server or database just doesn't care.

    Are there caveats?

    The kernel version you're running may dictate things like which storage drivers are available to Docker, but this doesn't really have any impact on your containers.

    Older kernel versions may have security vulnerabilities that are fixed in more recent versions, and newer versions may have fixes that offer improved performance.

提交回复
热议问题