I have udev rules written to create SYMLINKS when a device is connected. The rules are working fine on the host machine, but when I start a container with these same rules installed in /etc/udev/rules.d, they don't work inside my container.
I am trying to detect when an external drive is plugged in and create a corresponding symlink. /dev/sdX is created on boot of the container iff the drive was present at time of docker run
, but it won't appear after the run command, nor will it disappear upon the drive being removed.
Here's an example rule that works just fine on the host machine:
KERNEL=="sd?", SYMLINK+="test_%k"