Add image ls and image rm commands
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
mod build;
|
||||
mod image;
|
||||
mod qemu;
|
||||
mod registry;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
use crate::image::ImageCmd;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(about = "Build bootable initrd VMs from container images")]
|
||||
struct Cli {
|
||||
@@ -27,6 +30,9 @@ enum Commands {
|
||||
/// Image tag / registry subdir name
|
||||
name: String,
|
||||
},
|
||||
/// List slim images in the registry
|
||||
#[command(subcommand)]
|
||||
Image(ImageCmd),
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
@@ -38,6 +44,9 @@ fn main() -> Result<()> {
|
||||
Commands::Run { name } => {
|
||||
qemu::run(&name)?;
|
||||
}
|
||||
Commands::Image(cmd) => {
|
||||
image::run(cmd)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user