mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 12:50:54 +00:00
hypha: implement attach option on launch to connect to console
This commit is contained in:
parent
cbfac5cdf4
commit
3a04a2fe26
@ -31,6 +31,8 @@ enum Commands {
|
||||
config_bundle: Option<String>,
|
||||
#[arg[short, long]]
|
||||
env: Option<Vec<String>>,
|
||||
#[arg(short, long)]
|
||||
attach: bool,
|
||||
#[arg()]
|
||||
image: String,
|
||||
#[arg(allow_hyphen_values = true, trailing_var_arg = true)]
|
||||
@ -71,6 +73,7 @@ fn main() -> Result<()> {
|
||||
cpus,
|
||||
mem,
|
||||
config_bundle,
|
||||
attach,
|
||||
env,
|
||||
run,
|
||||
} => {
|
||||
@ -87,6 +90,9 @@ fn main() -> Result<()> {
|
||||
if run.is_empty() { None } else { Some(run) },
|
||||
)?;
|
||||
println!("launched container: {}", uuid);
|
||||
if attach {
|
||||
controller.console(&uuid.to_string())?;
|
||||
}
|
||||
}
|
||||
|
||||
Commands::Destroy { container } => {
|
||||
|
Loading…
Reference in New Issue
Block a user