I am playing around and getting some experience with packaging apps for NS8.
Now i want to make a tcp network port configurable from the cluster-admin.
The UI and firewall stuff i am on top of.
The thing is that it need to be a 1:1 mapping because the service informs clients which port to use. The port number is configured in a config file located on the volume mounted by the container. The files on the volume are owned by the user running the server within the container which means that the action scripts from the imageroot are not permitted to modify those.
I could probably get away with retrieve the file via podman, modify it and put it back (did not test yet).
Or are there a better option to modify content on a container volume?
@mrmarkuz, thanks for your detailed answer and the pointers.
I was looking at other projects for a answer, but only in the actions scripts, not the systemd service scripts as you proposed, which i find is a nice and clean way to a task like this.