summaryrefslogtreecommitdiffstats
path: root/examples/containerinspect.rs
blob: 0f853bc6f68082434148ebc3ee9cf2492f15e039 (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 containerinspect -- <container>");
    let fut = docker
        .containers()
        .get(&id)
        .inspect()
        .map(|container| println!("{:#?}", container))
        .map_err(|e| eprintln!("Error: {}", e));
    tokio::run(fut);
}