Commit Graph
12 Commits
Author SHA1 Message Date
hulthe d52a17fd53 Inject universal /slim/init instead of requiring container-specific setup
CI / build (pull_request) Successful in 13s
slim now works with any Containerfile by injecting distro-agnostic scripts
at build time:

- /slim/init: mounts special filesystems, configures networking (static
  QEMU slirp), sets up cgroup2, timezone, and rootless container prereqs.
  Parses slim.cmd=<base64> from the kernel cmdline for runtime overrides,
  otherwise execs /slim/exec.

- /slim/exec: generated from the image's CMD/ENTRYPOINT (via podman image
  inspect), overridable via --cmd at build and run time.

Changes:
- New src/inject.rs: inspect image config, infer command, generate
  /slim/exec script, inject /slim/ into mounted rootfs
- New src/scripts/slim-init.sh: the universal init script (include_str!)
- build.rs: rename --init to --cmd, inject scripts before packing,
  drop Meta::save, restructure to ensure unmount always runs
- qemu.rs: hardcode init=/slim/init, add --cmd (base64 on cmdline),
  drop Meta::load, add -no-reboot
- Remove src/meta.rs and meta.toml (no longer needed)
- Cargo.toml: add serde_json + base64, remove unused walkdir + cpio + toml
- Example Containerfiles simplified to plain FROM + CMD
- New example/test.sh for manual verification
- README updated for new workflow
2026-09-08 09:32:47 +02:00
hulthe 506213ed9a Fixes
CI / build (push) Successful in 14s
2026-09-06 16:09:20 +02:00
hulthe 7dd818db68 Progress
CI / build (push) Successful in 14s
2026-09-04 17:01:46 +02:00
hulthe 286def05c1 Add qcow2 support
CI / build (push) Successful in 13s
2026-08-30 17:08:08 +02:00
hulthe 46a86116b0 Add a --memory flag
CI / build (push) Successful in 10s
2026-08-29 21:12:23 +02:00
hulthe ec05936d2f Add Arch Linux example
CI / build (push) Successful in 10s
2026-08-29 21:04:35 +02:00
hulthe 41bc570bfb Print qemu command 2026-08-29 21:04:27 +02:00
hulthe 56a76ce934 Add basic README.md with an example
CI / build (push) Successful in 11s
2026-08-26 23:46:57 +02:00
hulthe 6af8660f8d Add qemu network device 2026-08-26 23:27:58 +02:00
hulthe 8b544ab688 Add image ls and image rm commands 2026-08-26 23:27:58 +02:00
hulthe d517ab6a1a Fix minor issues
CI / build (push) Successful in 10s
2026-08-26 21:45:26 +02:00
hulthe e3bd77379f Add lockfile
CI / build (push) Successful in 10s
2026-08-26 19:25:20 +02:00