Browse Source

Merge pull request #25070 from yongtang/24881-label-containers-with-stack-name

Label containers with stack name when deploying stack/bundle
Michael Crosby 9 years ago
parent
commit
a86b2376a0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      api/client/stack/deploy.go

+ 4 - 0
api/client/stack/deploy.go

@@ -168,6 +168,10 @@ func deployServices(
 					Command: service.Command,
 					Args:    service.Args,
 					Env:     service.Env,
+					// Service Labels will not be copied to Containers
+					// automatically during the deployment so we apply
+					// it here.
+					Labels: getStackLabels(namespace, nil),
 				},
 			},
 			EndpointSpec: &swarm.EndpointSpec{