Explorar o código

Merge pull request #9579 from paroque28/patch-1

build.go: initialize CustomLabels map if nil
Guillaume Lours %!s(int64=3) %!d(string=hai) anos
pai
achega
6c8ff02c07
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      pkg/compose/build.go

+ 3 - 3
pkg/compose/build.go

@@ -189,11 +189,11 @@ func (s *composeService) getLocalImagesDigests(ctx context.Context, project *typ
 		images[name] = info.ID
 	}
 
-	for _, s := range project.Services {
-		imgName := getImageName(s, project.Name)
+	for i := range project.Services {
+		imgName := getImageName(project.Services[i], project.Name)
 		digest, ok := images[imgName]
 		if ok {
-			s.CustomLabels[api.ImageDigestLabel] = digest
+			project.Services[i].CustomLabels.Add(api.ImageDigestLabel, digest)
 		}
 	}