diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14aa946..2c3a400 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: image: quay.io/fedora/fedora:latest options: "--privileged --tmpfs /var/tmp:rw,exec" steps: - - run: dnf -y install cargo gcc-c++ fuse3-devel openssl-devel crun skopeo pasta netavark + - run: dnf -y install cargo gcc-c++ fuse3-devel openssl-devel crun skopeo pasta netavark catatonit - uses: actions/checkout@v4 - name: Download binaries uses: actions/download-artifact@v4 diff --git a/README.md b/README.md index 94ed703..c2b2c78 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,10 @@ cfsctl init --insecure /tmp/repo cfsctl --repo /tmp/repo oci pull docker://quay.io/centos/centos:stream10 cs10 # Run a container (rootless — automatic) -target/debug/cfsrun --repo /tmp/repo -it cs10 -- bash +target/debug/cfsrun --repo /tmp/repo -t cs10 -- bash # Run as root (uses kernel erofs + bridge networking) -sudo target/debug/cfsrun --repo /tmp/repo -it cs10 -- bash +sudo target/debug/cfsrun --repo /tmp/repo -t cs10 -- bash ``` ### Common options @@ -48,7 +48,6 @@ cfsrun [OPTIONS] [-- ...] Options: --repo Path to composefs repository - -i, --interactive Keep stdin open -t, --tty Allocate a pseudo-TTY -e, --env Set environment variables -u, --user Override user diff --git a/composefs-run/src/run.rs b/composefs-run/src/run.rs index fc3e362..5a600f6 100644 --- a/composefs-run/src/run.rs +++ b/composefs-run/src/run.rs @@ -631,14 +631,10 @@ fn build_runtime_spec( let use_init = !cli.no_init && !systemd_mode; let init_path = if use_init { - match find_catatonit() { - Ok(path) => { - args.insert(0, "/dev/init".into()); - args.insert(1, "--".into()); - Some(path) - } - Err(_) => None, - } + let path = find_catatonit().context("catatonit is required (use --no-init to disable)")?; + args.insert(0, "/dev/init".into()); + args.insert(1, "--".into()); + Some(path) } else { None };