blob: de04ab979d89175fbd0b44e34ef4138f5eda56b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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.id,
i.repo_tags.unwrap_or_else(|| vec!["none".into()])
);
}
})
.map_err(|e| eprintln!("Error: {}", e));
tokio::run(fut);
}
|