Fix labels merge error (#1380)

This commit is contained in:
Hang Yan
2021-05-01 18:27:41 +08:00
committed by GitHub
parent fb3b2257c6
commit bd1abffb16
+3
View File
@@ -747,6 +747,9 @@ func mergeComposeObject(oldCompose *types.Config, newCompose *types.Config) (*ty
}
if len(service.Labels) != 0 {
// merge the 2 sets of values
if tmpOldService.Labels == nil {
tmpOldService.Labels = make(map[string]string)
}
for k, v := range service.Labels {
tmpOldService.Labels[k] = v
}