add env support in mesos

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux
2015-07-14 14:47:47 -07:00
parent ef2d11899a
commit b3385caa4e
3 changed files with 38 additions and 1 deletions

View File

@@ -104,6 +104,10 @@ func (t *task) build(slaveID string) {
t.Container.Docker.Parameters = append(t.Container.Docker.Parameters, &mesosproto.Parameter{Key: proto.String("label"), Value: proto.String(fmt.Sprintf("%s=%s", key, value))})
}
for _, value := range t.config.Env {
t.Container.Docker.Parameters = append(t.Container.Docker.Parameters, &mesosproto.Parameter{Key: proto.String("env"), Value: proto.String(value)})
}
t.SlaveId = &mesosproto.SlaveID{Value: &slaveID}
}