软件驱动安装在docker_在哪里安装设备驱动程序以使docker识别设备?

I have some binaries running on ubuntu that control various devices like onboard/usb wifi/bluetooth chips. Some chips will require additional drivers.

My guess is that merely installing the drivers to the docker image is not enough, and the host OS must have the drivers. Is this correct?

If yes, why does the docker image need any drivers at all if the host already does? How can docker image correctly delegates to host? Do these need to be hardcoded for each driver on each host OS?

Also from this perspective, does docker require more or less hardcoding than a VM?

I feel the answer probably depends on how the devices are presented to docker and where the driver has to run (e.g kernel space vs user space).

Thanks!

解决方案

It will depend the device and drivers. Most drivers need some support from Kernel, and in those cases your host kernel must provide the functionality. Some of the driver's functionality, dependent libraries and applications may be implemented in userspace (for example packages libusb, usbutils...) and your container should have those packages installed. And also, when running your container, you must explicitly indicate Docker to map the device in your container (any /dev/*). You have two options:

Use docker run with option --device

Use docker run mapping the device as a volume (option -v) in privileged mode --privileged=true

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值