Rewrite init script in rust and fix non-shell CMDs
CI / build (push) Successful in 14s

This commit is contained in:
2026-09-11 14:40:10 +02:00
parent 3a99da196d
commit d7613a4987
10 changed files with 603 additions and 189 deletions
+6 -4
View File
@@ -75,12 +75,14 @@ fn build_inner(
cmd: Option<String>,
) -> Result<()> {
let config = inject::inspect_config(image)?;
let command = cmd.unwrap_or_else(|| inject::infer_command(&config));
let exec_script =
inject::build_exec_script(&command, &config.env, config.working_dir.as_deref());
let argv = match cmd {
Some(s) => vec!["/bin/sh".into(), "-c".into(), s],
None => inject::infer_argv(&config),
};
inject::inject(
mount_path,
&exec_script,
&argv,
&config.env,
config.user.as_deref(),
config.working_dir.as_deref(),
)?;