Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

304
Vistas
docker linux container doesn't support driver development?

To develop driver program, we need /lib/modules//build directory. But I found under docker image of centos, even after I

yum install kernel-devel

There's still no such a directory with all its contents. Question:

(1) how to make it possible to develop driver in a docker linux environment?

(2) is it possible to load this developed module?

about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

Docker is not virtual machine.

Ubuntu with docker is not real ubuntu.

If you want to develop with ubuntu, you should use virtualbox or vmware.

Check this link for more information

about 4 years ago · Santiago Trujillo Denunciar

0

Docker uses the kernel of the host machine.

about 4 years ago · Santiago Trujillo Denunciar

0

After reading this page, I almost gave up building a kernel module in Docker so I'm adding this answer hoping it helps somebody. See also what-is-the-difference-between-kernel-drivers-and-kernel-modules

You can build Kernel modules in Docker as long as the Kernel source required for the build is available inside Docker. Lets say you want to build against the latest kernel source available in your yum repos, you could install the kernel source using yum install kernel-devel. The source will be in /usr/src/kernels/<version> directory. You could install specific version of kernel-devel from your repo if that is what you want.

Then build the module using $ make -C <path_to_kernel_src> M=$PWD where the path to the kernel source would be /usr/src/kernels/<version>.

Read - Kernel Build System » Building External Modules

Docker container uses the kernel of the host machine so if you want to build against the running kernel, i.e., the kernel of the Docker host machine, you could try running the container in privileged mode and mounting the modules directory. docker run --name container_name --privileged --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules image_id See this

You should not load the modules on a kernel that is not the same as the one the module was built for. You could force install it but that is highly discouraged. Remember your running kernel, i.e., the Docker host kernel, is the kernel of the Docker container irrespective of what kernel-devel version you installed.

To see the kernel the module was built for (or built using), run modinfo <module> and look for vermagic value.

Dynamic Kernel Module Support is also worth a read.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda