summaryrefslogtreecommitdiffstats
path: root/examples/imageinspect.rs
blob: b7d2f9a6825b47c684423f6e4ea35fb1791d1867 (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 imageinspect -- <image>");

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