dockerkernelkernel-module

Docker loading kernel modules


I tried to install a kernel module, xfsprogs. It was successfully installed inside a container. It is really surprising, but lsmod doesn't list this module inside container or in the host system. How can a new kernel module loaded in a container?(CentOS container, Ubuntu host)


Solution

  • Containers interact with the kernel through system calls and don't include any part of the kernel or the kernel modules inside the container. This is one of the reasons why containers designed to be light weight and portable. Also xfsprogs are user space programs and not kernel modules.

    How can a new kernel module loaded in a container?(CentOS container, Ubuntu host)

    The module needs to be loaded on your host OS, and not from the docker container.