Post-start scripts possible with LXC?

I want to ‘renice’ a process in an unprivileged container once it has been started. Is there something in LXC that can help here? A post-start script or something? As far as i know ‘renice’ is impossible from inside the container.

lxc.hook.start-host
A hook to be run in the host's namespace after the container has been setup,
and immediately before starting the container init.

might help you. See also all other hooks listed in man lxc.container.conf.

1 Like