From 24a078beb3bd831e4a46db2b599327788b206284 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Mon, 28 Nov 2016 09:07:27 +0100 Subject: [PATCH] read detached from yaml --- yaml/container.go | 2 ++ yaml/container_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/yaml/container.go b/yaml/container.go index 441744f89..24380eaa0 100644 --- a/yaml/container.go +++ b/yaml/container.go @@ -61,6 +61,7 @@ type container struct { Image string `yaml:"image"` Build string `yaml:"build"` Pull bool `yaml:"pull"` + Detached bool `yaml:"detach"` Privileged bool `yaml:"privileged"` Environment types.MapEqualSlice `yaml:"environment"` Labels types.MapEqualSlice `yaml:"labels"` @@ -131,6 +132,7 @@ func (c *containerList) UnmarshalYAML(unmarshal func(interface{}) error) error { Image: cc.Image, Build: cc.Build, Pull: cc.Pull, + Detached: cc.Detached, Privileged: cc.Privileged, Environment: cc.Environment.Map(), Labels: cc.Labels.Map(), diff --git a/yaml/container_test.go b/yaml/container_test.go index 6d0af800b..623944bc3 100644 --- a/yaml/container_test.go +++ b/yaml/container_test.go @@ -27,6 +27,7 @@ func TestContainerNode(t *testing.T) { g.Assert(c.Image).Equal("golang") g.Assert(c.Build).Equal(".") g.Assert(c.Pull).Equal(true) + g.Assert(c.Detached).Equal(true) g.Assert(c.Privileged).Equal(true) g.Assert(c.Entrypoint).Equal([]string{"/bin/sh"}) g.Assert(c.Command).Equal([]string{"yes"}) @@ -69,6 +70,7 @@ foo: image: golang build: . pull: true + detach: true privileged: true environment: FOO: BAR