Where to install device drivers to make docker recognize the device?

前端 未结 1 1536
悲&欢浪女
悲&欢浪女 2021-02-20 04:10

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

相关标签:
1条回答
  • 2021-02-20 04:37

    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:

    1. Use docker run with option --device
    2. Use docker run mapping the device as a volume (option -v) in privileged mode --privileged=true
    0 讨论(0)
提交回复
热议问题