mirror of https://github.com/docker/compose.git
Merge pull request #9579 from paroque28/patch-1
build.go: initialize CustomLabels map if nil
This commit is contained in:
commit
6c8ff02c07
|
@ -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