Run apk
inside docker
Co-authored-by: Glaeder <niklas@vousten.dev>
This commit is contained in:
parent
45da6cbc04
commit
95f3dc0351
2 changed files with 7 additions and 1 deletions
|
@ -79,6 +79,12 @@ initramfs initramfs-rpi4
|
|||
|
||||
// bootstrap alpine
|
||||
run(&[
|
||||
"docker",
|
||||
"run",
|
||||
"--rm",
|
||||
"-v",
|
||||
&format!("{root}:{root}", root = &*img.root),
|
||||
"alpine",
|
||||
"apk",
|
||||
"add",
|
||||
"--root",
|
||||
|
|
|
@ -22,7 +22,7 @@ pub fn prepare_img() -> anyhow::Result<Image> {
|
|||
run_parted!(path, "mkpart", "primary", "ext4", "128M", &size)?;
|
||||
|
||||
// create a loopback device
|
||||
let output = run_output(&["losetup", "-f", "--show", path.to_str().unwrap()])?;
|
||||
let output = run_output(&["losetup", "-P", "-f", "--show", path.to_str().unwrap()])?;
|
||||
print!("{output}");
|
||||
let idx = output.find("/dev/loop").ok_or_else(|| anyhow!("Unable to identify loop device"))?;
|
||||
let mut end = idx + "/dev/loop".len();
|
||||
|
|
Loading…
Reference in a new issue