Debian container unable to access host USB devices - lsusb returns empty

I am trying to get my docker container (Debian Arm64) to access the usb devices on my Raspberry Pi OS host (RPi 4) and failing.

If I run the following command using --privileged command, nothing is returned by lsusb:

docker run --rm -it --privileged debian bash
root@fe612fde137f:/# apt-get update && apt-get install -y usbutils
root@fe612fde137f:/# lsusb

If I run lsusb in a terminal outside the container, all connected usb devices are returned as expected.

Also, I am unable to see /dev/bus/usb from within the container, even when using the --privileged or --device options:

docker run --rm -it --privileged --device=/dev/bus/usb debian bash
root@fe612fde137f:/# cd /dev/bus/usb
ls: cannot access '/dev/bus/usb': No such file or directory

I have also tried mounting /dev/bus/usb as a volume, but lsusb still returns nothing.

If, however, I create an ubuntu base image, lsusb returns all devices and /dev/bus/usb is visible from within the container. However, I can only use Debian for my project :frowning:

Any ideas?



26D. These threads aren’t that active are they?

You ran “cd”. Try -v /dev/bus/usb:/dev/bus/usb or use --device on one of the underlying usb files within the folder structure.