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)
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
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.
The module needs to be loaded on your host OS, and not from the docker container.
docker run --name container_name --privileged --cap-add=ALL -d -v /dev:/dev -v /lib/modules:/lib/modules image_id
Here all linux capabilities is added so capabilities can be refined.
Falco is an example of a container that loads a kernel module as part of its start process.