Skip to content

Commit 6c8ff02

Browse files
authored
Merge pull request docker#9579 from paroque28/patch-1
build.go: initialize CustomLabels map if nil
2 parents 5bc4016 + eb06e1c commit 6c8ff02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/compose/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ func (s *composeService) getLocalImagesDigests(ctx context.Context, project *typ
189189
images[name] = info.ID
190190
}
191191

192-
for _, s := range project.Services {
193-
imgName := getImageName(s, project.Name)
192+
for i := range project.Services {
193+
imgName := getImageName(project.Services[i], project.Name)
194194
digest, ok := images[imgName]
195195
if ok {
196-
s.CustomLabels[api.ImageDigestLabel] = digest
196+
project.Services[i].CustomLabels.Add(api.ImageDigestLabel, digest)
197197
}
198198
}
199199

0 commit comments

Comments
 (0)