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

fn main() {
    let docker = Docker::new();
    println!("docker images in stock");
    let fut = docker
        .images()
        .list(&Default::default())
        .map(|images| {
            for i in images {
                println!("{:?}", i.repo_tags.unwrap_or_else(|| vec!["none".into()]));
            }
        })
        .map_err(|e| eprintln!("Error: {}", e));
    tokio::run(fut);
}