Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

If no image tag set use image content-digest #703

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ func render(appPath string, composeContent string, imageMap map[string]bundle.Im
if err := processEnabled(rendered); err != nil {
return nil, err
}
// Apply relocation map
for ix, service := range rendered.Services {
if img, ok := imageMap[service.Name]; ok {
service.Image = img.Image
if img.Image == "" {
service.Image = img.Digest
}
rendered.Services[ix] = service
}
}
Expand Down