summaryrefslogtreecommitdiffstats
path: root/examples/imagecreate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/imagecreate.rs')
-rw-r--r--examples/imagecreate.rs16
1 files changed, 16 insertions, 0 deletions
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);
+ }
+ }
+}