Skip to content

Commit

Permalink
Update to latest upstream (#1)
Browse files Browse the repository at this point in the history
* Improve a few examples

* Fix missing comma
  • Loading branch information
Innectic authored Apr 2, 2018
1 parent 22ea1ac commit 872420b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ fn main() {
let docker = Docker::connect_with_defaults().unwrap();
let opts = ContainerListOptions::default().all();
let containers = docker.containers(opts).unwrap();

for container in &containers {
println!("{}", container.Id);
println!("{} -> Created: {}, Image: {}, Status: {}", container.Id, container.Created, container.Image, container.Status);
}
}
6 changes: 5 additions & 1 deletion examples/images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ use boondock::Docker;

fn main() {
let docker = Docker::connect_with_defaults().unwrap();
docker.images(false).unwrap();
let images = docker.images(false).unwrap();

for image in &images {
println!("{} -> Size: {}, Virtual Size: {}, Created: {}", image.Id, image.Size, image.VirtualSize, image.Created);
}
}

0 comments on commit 872420b

Please sign in to comment.