From 4944cb2346e85677bb16a460093762c0e1181a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=B3=E5=85=89=E5=B0=91=E5=B9=B4?= <849317537@qq.com> Date: Thu, 1 Aug 2024 05:36:28 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index f8fd092..cef9f84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -490,14 +490,16 @@ fn delete_container(containers_id: &str) -> Result<()> { fn main() -> Result<()>{ let args = RockerArgs::parse(); - // run if let (Some(cmd), Some(image_name)) = (&args.run, &args.image) { + // run let volume_path = extend_image(image_name)?; let (container_id, pid) = run_container(cmd, &args, &volume_path)?; save_container_info(&args, &container_id, pid)?; // todo 无论出不错, 都要保存一个信息, 后面需要删除用清理 } else if args.ps || args.psa { + // --ps show_containers(args.psa)? } else if let Some(containers_id) = &args.rm { + // --rm delete_container(containers_id)?; } @@ -505,8 +507,6 @@ fn main() -> Result<()>{ // logs - // rm - Ok(()) } \ No newline at end of file