Docker加载内核模块 [英] Docker loading kernel modules

查看:3314
本文介绍了Docker加载内核模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装一个内核模块, xfsprogs 。它已成功安装在容器内。这真的是令人惊讶的,但是 lsmod 不会在容器或主机系统中列出这个模块。
如何将新的内核模块加载到容器中?( CentOS 容器, Ubuntu 主机) p>

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)

推荐答案

容器通过系统调用与内核进行交互,不要在容器内部包含内核或内核模块的任何部分。这就是为什么集装箱设计重量轻便携带的原因之一。另外xfsprogs是用户空间程序,而不是内核模块。

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.


如何将新内核模块加载到容器中?(CentOS容器,Ubuntu主机)

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

该模块需要在主机操作系统上加载,而不是从docker容器加载。

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

这篇关于Docker加载内核模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆