Add devices to existing Docker container

Actually, at least for Linux, you can. You need to get the device major number, and then add it to devices.allow.

So, for example:
udevadm info -q property -n /dev/bus/usb/$BUS/$DEV | grep MAJOR

would return something like:

MAJOR=189

Now get the container ID:

docker ps

The ID will be something like ‘79a934b19eb3’

So now pass it through:

echo ‘c 189:* rwm’ > /sys/fs/cgroup/devices/docker/79a934b19eb3*/devices.allow

I’ve scripted all this up, but this is just an example.