I was wondering if there was a way to include a package like inotify-tools during a custom image build with the torizoncore base image? I am using the 5.7.0 long term release of torizoncore as the base image on an apalis-imx8. I use the torizoncore-builder tool to create the custom image.
Before I dive deeper into your request I have a question. What is your use-case/purpose for requesting inotify-tools?
Also do you intend to move to TorizonCore 6.X? You said you’re on the 5.7 LTS, which would be problematic in terms of adding inotify-tools. Since this is a LTS release then by our own definition we do not add any new features or anything to an LTS release, just bug fixes.
We are going to be using this as a work-around to be able to shut-off the host board from one of our docker containers.
We will be writing a string to a file on the host board and when that is detected by a script using inotifywait it will shutdown the host board.
There might be a better way to do this but I had trouble finding alternatives to shutdown the board via a container without adding a lot of sensitive files as volumes on the container.
I think I understand now. So your ultimate goal here is to be able to initiate a shutdown from your container. However, you don’t want to give the container access to the usual “sensitive” files required to do a shutdown. I assume you’re avoiding this for security reasons correct?
As an alternative, you then came up with this method here where instead you write to a sentinel file of sorts that is shared between the host and container. You then plan to use inotify-tools to trigger off this sentinel file to then initiate the shutdown. Did I understand everything right?
So if you had a way to shutdown the board from the container without adding sensitive files that would fulfill your goal as well too right? Not that I’m saying we’re against possibly adding inotify-tools to our image, I just want to keep the options open.
Also back to the possibility of adding inotify-tools. You didn’t answer my previous question on whether you’d be willing to go to TorizonCore 6.X or not.
After looking into this a bit more. I have found an alternative option for shutting down the host not requiring inotify-tools. I am going to use systemd as a watchdog to detect changes on the file and then execute a script.
Glad you were able to come up with an alternative solution.