diff options
author | softprops <d.tangren@gmail.com> | 2016-01-03 20:11:58 -0500 |
---|---|---|
committer | softprops <d.tangren@gmail.com> | 2016-01-03 20:11:58 -0500 |
commit | ad205ad14f859b2d4a07d31ed1d31b2f87a68f4d (patch) | |
tree | 2f942e2ffdba257f04d26e89b3638d83ff1fb8e4 | |
parent | 4fc64c315713f68c513a66468921299863a4ecc0 (diff) |
images should have labels... sometimes
-rw-r--r-- | examples/images.rs | 8 | ||||
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | src/rep.rs | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/examples/images.rs b/examples/images.rs index d284a37..b2576b3 100644 --- a/examples/images.rs +++ b/examples/images.rs @@ -1,15 +1,11 @@ extern crate shiplift; -use shiplift::{Docker, ImageListOptions, ImageFilter}; +use shiplift::Docker; fn main() { let docker = Docker::new(); for i in docker.images(). - list( - &ImageListOptions::builder().filter( - vec![ImageFilter::Dangling] - ).build() - ).unwrap() { + list(&Default::default()).unwrap() { println!("image -> {:?}", i) } } @@ -296,12 +296,12 @@ impl<'a, 'b> Container<'a, 'b> { Ok(try!(json::decode::<Exit>(&raw))) } - /// Delete the container instance + /// Delete the container instance (todo: force/v) pub fn delete(&self) -> Result<()> { self.docker.delete(&format!("/containers/{}", self.id)[..]).map(|_| ()) } - // todo attach, attach/ws, + // todo attach, attach/ws, copy, archive } /// Interface for docker containers @@ -17,7 +17,7 @@ pub struct Image { pub Created: u64, pub Id: String, pub ParentId: String, - // pub Labels: ???, + pub Labels: Option<HashMap<String, String>>, pub RepoTags: Vec<String>, pub RepoDigests: Option<Vec<String>>, pub Size: u64, |