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