patch: build.go access custom labels directly cause panic

Signed-off-by: Risky Feryansyah Pribadi <riskypribadi24@gmail.com>
This commit is contained in:
Risky Feryansyah Pribadi 2022-09-06 22:32:43 +07:00
parent 8a9eae3190
commit 07eb8a598d
1 changed files with 2 additions and 2 deletions

View File

@ -138,8 +138,8 @@ func (s *composeService) ensureImagesExists(ctx context.Context, project *types.
if project.Services[i].Labels == nil {
project.Services[i].Labels = types.Labels{}
}
project.Services[i].CustomLabels[api.ImageDigestLabel] = digest
project.Services[i].CustomLabels[api.ImageNameLabel] = service.Image
project.Services[i].CustomLabels.Add(api.ImageDigestLabel, digest)
project.Services[i].CustomLabels.Add(api.ImageNameLabel, service.Image)
}
}
return nil