diff options
author | softprops <d.tangren@gmail.com> | 2016-01-18 01:45:44 -0500 |
---|---|---|
committer | softprops <d.tangren@gmail.com> | 2016-01-18 01:45:44 -0500 |
commit | 7f9b3e4b77c8dcdbf5e6b7274cb30a4d2086fccb (patch) | |
tree | 29516dcf506a4d4779bf4319da68e5141272726e /examples | |
parent | 89740ae3c4ece331d8dbb731de14d60ee7f8a0b5 (diff) |
massive progress
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); + } + } +} |