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 run --name container_name --privileged --cap-add=ALL -d \
-v /dev:/dev -v /lib/modules:/lib/modules image_id
Caution: Here all Linux capabilities are added so capabilities can be refined.