Docker Community Forums

Share and learn in the Docker community.

Problem with USB dongles in Docker containers


(Akochenkov) #1

Hello!
I am running an application in docker container that requires an USB dongle to run.
This app requires a privileged container to run correctly.
I have an usb hub with dongles and trying to run multiple containers at the same time. But dongle driver chooses the same key for each running container.

I have tried to use –device key with different dongles for different containers, but unfortunately this key is not working in privileged mode.
I have tried to disable some dongles in /sys (mount --rbind /empty /sys/devices/path/to/device/directory) without any luck.
Somehow driver manages to choose the “wrong” dongle.

Is there any other way to hide some of host usb devices in the running privileged container?
I am using docker 1.6.2, build 7c8fca2 on Debian 8.2.


(Johannes Amorosa) #2

Hi Akochenkov,
did you find a solution? I can expose the USB-Dongle to the container. But app won’t recognize it. Although it could be the copy protection “usbdriver” is missing a dependency without telling us.

lsusb:
...
Bus 002 Device 006: ID 04b9:0300 Rainbow Technologies, Inc. SafeNet USB SuperPro/UltraPro
...

Option:
–device=/dev/ttyUSB0

Thank you for your time