diff options
Diffstat (limited to 'examples')
l--------- | examples/.#imagebuild.rs | 1 | ||||
-rw-r--r-- | examples/imagebuild.rs | 6 | ||||
-rw-r--r-- | examples/imagecreate.rs | 16 |
3 files changed, 21 insertions, 2 deletions
diff --git a/examples/.#imagebuild.rs b/examples/.#imagebuild.rs new file mode 120000 index 0000000..b5ce94d --- /dev/null +++ b/examples/.#imagebuild.rs @@ -0,0 +1 @@ +dougtangren@Dougs-MacBook-Air.local.58180
\ No newline at end of file diff --git a/examples/imagebuild.rs b/examples/imagebuild.rs index ed08949..6de23be 100644 --- a/examples/imagebuild.rs +++ b/examples/imagebuild.rs @@ -7,8 +7,10 @@ fn main() { let docker = Docker::new(); if let Some(path) = env::args().nth(1) { let image = docker.images() - .build(&BuildOptions::builder(path).build()) + .build(&BuildOptions::builder(path).tag("shiplift_test").build()) .unwrap(); - println!("{:?}", image); + for output in image { + println!("{:?}", output); + } } } diff --git a/examples/imagecreate.rs b/examples/imagecreate.rs new file mode 100644 index 0000000..2b1b895 --- /dev/null +++ b/examples/imagecreate.rs @@ -0,0 +1,16 @@ +extern crate shiplift; + +use shiplift::Docker; +use std::env; + +fn main() { + let docker = Docker::new(); + if let Some(img) = env::args().nth(1) { + let image = docker.images() + .create(&img[..]) + .unwrap(); + for output in image { + println!("{:?}", output); + } + } +} |