feat: Add custom crun root and enhance container lifecycle
- Use custom `crun --root` for all container commands - Implement `cleanup_crun_state` for factory reset - Add retry logic for `crun create` on "File exists" error - Improve OCI config with `set_terminal`, unique env/rlimits - Add default mounts for `/dev/pts`, `/dev/shm`, `/dev/mqueue`, `/sys/fs/cgroup`
This commit is contained in:
@@ -93,6 +93,7 @@ fn (mut self ContainerFactory) create_crun_config(container_name string, rootfs_
|
||||
mut config := crun.new(mut self.crun_configs, name: container_name)!
|
||||
|
||||
// Configure for heropods use case - disable terminal for background containers
|
||||
config.set_terminal(false)
|
||||
config.set_command(['/bin/sh', '-c', 'while true; do sleep 30; done'])
|
||||
config.set_working_dir('/')
|
||||
config.set_user(0, 0, [])
|
||||
|
||||
Reference in New Issue
Block a user