Installing an autorun program into the docker host with torizon builder

Hi,
My basic problem is that I would like to change the IP address from a program that runs in a container. For this, I wrote a small program for the host side, which I can start from the rc.local or from the file inside profile.d. I can create these and copying the program to the /home/torizon directory manually with the necessary permissions and it works well. My question is how to build this in to the TorizonCore image? Is TorizonCore Builder suitable for this?

Sytem information:
Apalis IMX6Q 1GB
TorizonCore 5.7.2

Greetings @vigh.balazs,

I can create these and copying the program to the /home/torizon directory manually with the necessary permissions and it works well.

If you want to capture these changes with TorizonCore Builder than this would not work. TorizonCore Builder can’t manage anything under /var and /home/torizon is actually a symlink under /var. In short this is because of how OSTree works and how /var is not a managed directory by design. If you place this somewhere else like in /etc for example, then TorizonCore Builder should be able to capture this change.

By the way just so I understand your goal here better, you created an app that runs on the host OS outside of the container to change the device’s IP address? Is that correct? Is there a reason you have an app for doing this rather than just changing the device’s IP address directly then capturing that change?

Best Regards,
Jeremias

Thank you for your answer.
Ok, I understand. What is important to me is that a user can change the static IP address from our own program at any time. The program that serves the user runs in a container. It seemed to me that a simpler solution would be to run a small program on the host side that can change the IP, which can be controlled via the network, as you mentioned here: Change the apalis imx6 static IP address from inside a container . This works, but for production it would be good if this could be added to the filesystem. I tried adding a change folder to the filesystem line in the tcbuild.yaml file, where I put the two files: change/usr/etc/rc.local and change/usr/etc/IP_set_program. However, they don’t run because they don’t have permission to run.
Another solution is also good for me, which can be used to set the IP address.

I tried adding a change folder to the filesystem line in the tcbuild.yaml file, where I put the two files: change/usr/etc/rc.local and change/usr/etc/IP_set_program. However, they don’t run because they don’t have permission to run.

Wait how exactly did you add these files? Did you isolate them from a device or did you try to manually construct the changes directory from scratch? I would recommend just adding the files to /etc on the device then using the isolate command from TorizonCore Builder to capture these changes. There’s a bit of nuance to creating the changes directory that can be hard to get right when creating it manually.

Also as for permissions, do you mean root permissions, or something else like execute permissions?

Best Regards,
Jeremias

Thanks for the reply.
I overcomplicated the operation, i tried to manually construct the changes directory. The isolate command is exactly what I need. It works fine now.

Perfect glad to hear you have something working.