I am running a container that needs a USB device to work. The application in the container requires a licencing dongle.
I have managed to make it work using --device=/dev/bus/usb/003/003.
My issue is that i can not guarantee that the USB wont be unplugged. if this is the case a new ID is assigned. so the 003/003 would become 003/004. every time the device is unplugged it will assign a new id. If the Server is rebooted then the ID will start back at the lowest number in my case 003. This means start up script would need to know what ID the usb is plugged into
I have tried using the dev name for the devices but it does’nt work. the key when plugged in generates
I have mounted both of these using --device= but it didnt work. I cant work out why.
I used privileges mode and that did work but I found it removed the device from the host which isn’t a problem. If the container was stopped then the device isn’t present on the host machines /dev folder any more and i cant start the container again as it cant find /hidraw1, it does still exsit in /dev/bus/usb/003/ directory tho. The solution was to unplug the usb and plug it back in. Again this isn’t really a solution.
I have looked at :rwm and that didn’t help me
i have tried mounting them using -v and --device as the same time.
I am running docker on Ubuntu 14.10 desktop version and will migrate it to server
Wonder if anyone out there can throw some light on the subject