summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsoftprops <d.tangren@gmail.com>2016-01-03 20:11:58 -0500
committersoftprops <d.tangren@gmail.com>2016-01-03 20:11:58 -0500
commitad205ad14f859b2d4a07d31ed1d31b2f87a68f4d (patch)
tree2f942e2ffdba257f04d26e89b3638d83ff1fb8e4
parent4fc64c315713f68c513a66468921299863a4ecc0 (diff)
images should have labels... sometimes
-rw-r--r--examples/images.rs8
-rw-r--r--src/lib.rs4
-rw-r--r--src/rep.rs2
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)
}
}
diff --git a/src/lib.rs b/src/lib.rs
index e1def81..4965157 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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
diff --git a/src/rep.rs b/src/rep.rs
index ec02ca1..2f8e9bd 100644
--- a/src/rep.rs
+++ b/src/rep.rs
@@ -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,