Set labels on container create

Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit is contained in:
Darren Shepherd
2015-03-13 10:02:04 -07:00
parent cdfdfbfb62
commit abb5e9a077
8 changed files with 264 additions and 11 deletions
+9
View File
@@ -724,6 +724,15 @@ COPY . /static`); err != nil {
ctx: ctx}, nil
}
func inspectFieldAndMarshall(name, field string, output interface{}) error {
str, err := inspectFieldJSON(name, field)
if err != nil {
return err
}
return json.Unmarshal([]byte(str), output)
}
func inspectFilter(name, filter string) (string, error) {
format := fmt.Sprintf("{{%s}}", filter)
inspectCmd := exec.Command(dockerBinary, "inspect", "-f", format, name)