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

fn main() {
    env_logger::init();
    let docker = Docker::new();
    let fut = docker
        .containers()
        .list(&Default::default())
        .map(|containers| {
            for c in containers {
                println!("container -> {:#?}", c)
            }
        })
        .map_err(|e| eprintln!("Error: {}", e));

    tokio::run(fut);
}