I have a docker container that connects to my personal weather station (PWS) that is connected through USB. This device will randomly disconnect and reconnect (it's a "feature" of the panel), so I created some rules to give the device a name. This name is static, and will update when it reconnects. Let's say the device is /dev/mypws.
In Extra Parameters, I have this "--device=$(readlink -f /dev/mypws)"
This works great! When I create the container, everything works flawlessly.
However, when I restart the container, it doesn't run again, so the container still has the old endpoint. I would love for this command to run every time it starts. How do I get it to do that?
I have tried passing /dev/mypws as a device to the docker container, but it doesn't seem to like that very much for some reason.
If anyone has any ideas on how to pass the device in a way I haven't thought of, or some way to run the command every time I start the container, that would be fantastic.