summaryrefslogtreecommitdiffstats
path: root/examples/imageinspect.rs
blob: 494480a1ce7c1e77094fef5012f19fd065e8c2e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use shiplift::Docker;
use std::env;
use tokio::prelude::Future;

fn main() {
    let docker = Docker::new();
    let id = env::args()
        .nth(1)
        .expect("Usage: cargo run --example imageinspect -- <image>");
    let fut = docker
        .images()
        .get(&id)
        .inspect()
        .map(|image| println!("{:#?}", image))
        .map_err(|e| eprintln!("Error: {}", e));
    tokio::run(fut);
}