blob: 1c0852e0ac73d0ee4f9c584b5639c4c24638308a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use shiplift::Docker;
#[tokio::main]
async fn main() {
let docker = Docker::new();
println!("docker images in stock");
let result = docker.images().list(&Default::default()).await;
match result {
Ok(images) => {
for i in images {
println!(
"{} {} {:?}",
i.id,
i.created,
i.repo_tags.unwrap_or_else(|| vec!["none".into()])
);
}
}
Err(e) => eprintln!("Error: {}", e),
}
}
|