summaryrefslogtreecommitdiffstats
path: root/examples/containerinspect.rs
blob: 8de2a672acbd8c34dda4e35a7b3bd55bdde82175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use shiplift::Docker;
use std::env;

#[tokio::main]
async fn main() {
    let docker = Docker::new();
    let id = env::args()
        .nth(1)
        .expect("Usage: cargo run --example containerinspect -- <container>");

    match docker.containers().get(&id).inspect().await {
        Ok(container) => println!("{:#?}", container),
        Err(e) => eprintln!("Error: {}", e),
    }
}