Skip to content

Commit eb06e1c

Browse files
committed
build.go: Access customLabels directly instead of by reference
Accesing the map directly instead of the copy value, otherwise the label doesn't get set. Signed-off-by: Pablo Rodriguez <[email protected]>
1 parent 5bc4016 commit eb06e1c

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)