Browse code

Add logdrivers to executor from swarmkit

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2016/07/09 03:43:42
Showing 1 changed files
... ...
@@ -266,11 +266,20 @@ func getMountMask(m *api.Mount) string {
266 266
 }
267 267
 
268 268
 func (c *containerConfig) hostConfig() *enginecontainer.HostConfig {
269
-	return &enginecontainer.HostConfig{
269
+	hc := &enginecontainer.HostConfig{
270 270
 		Resources: c.resources(),
271 271
 		Binds:     c.binds(),
272 272
 		Tmpfs:     c.tmpfs(),
273 273
 	}
274
+
275
+	if c.task.LogDriver != nil {
276
+		hc.LogConfig = enginecontainer.LogConfig{
277
+			Type:   c.task.LogDriver.Name,
278
+			Config: c.task.LogDriver.Options,
279
+		}
280
+	}
281
+
282
+	return hc
274 283
 }
275 284
 
276 285
 // This handles the case of volumes that are defined inside a service Mount