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
|
images[name] = info.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, s := range project.Services {
|
for i := range project.Services {
|
||||||
imgName := getImageName(s, project.Name)
|
imgName := getImageName(project.Services[i], project.Name)
|
||||||
digest, ok := images[imgName]
|
digest, ok := images[imgName]
|
||||||
if ok {
|
if ok {
|
||||||
s.CustomLabels[api.ImageDigestLabel] = digest
|
project.Services[i].CustomLabels.Add(api.ImageDigestLabel, digest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue