youki 0.2.0

A container runtime written in Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Starts execution of the container

use std::path::PathBuf;

use anyhow::{Context, Result};

use crate::commands::load_container;

use liboci_cli::Start;

pub fn start(args: Start, root_path: PathBuf) -> Result<()> {
    let mut container = load_container(root_path, &args.container_id)?;
    container
        .start()
        .with_context(|| format!("failed to start container {}", args.container_id))
}