How can a container access pci devices?

Host System: Ubuntu 16.04.7 desktop
Container: ubuntu:16.04
I need to deploy my program to a container using a PCI CardBus device.
How to access this device in the container?
Here is my command:
sudo docker run -d -p 8888:8888 -v /opt/advantech:/opt/advantech -v /sys/bus/pci/devices:/sys/bus/pci/devices -v /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepages -v /sys/devices/system/node:/sys/devices/system/node -v /var/lib/daq:/var/lib/daq --privileged -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro --name driver_test myImage/test
That didn’t work…
“/opt/advantech” is the driver of this device and “/var/lib/daq” is the related stuff
Or maybe I shouldn’t have used docker ? …


Try running it with --device instead: Docker run reference