mirror of https://github.com/docker/compose.git
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 <pablo.aarch64@gmail.com>
This commit is contained in:
parent
5bc4016e70
commit
eb06e1ca56
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue