summaryrefslogtreecommitdiffstats
path: root/examples/imagebuild.rs
blob: ed08949bbb42a7f58b11ba4396a8b6feb4186836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate shiplift;

use shiplift::{BuildOptions, Docker};
use std::env;

fn main() {
    let docker = Docker::new();
    if let Some(path) = env::args().nth(1) {
        let image = docker.images()
            .build(&BuildOptions::builder(path).build())
            .unwrap();
        println!("{:?}", image);
    }
}