Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 65875cf

Browse files
committed
If no image tag set use image content-digest
This also make the compose spec compliant with docker stack deploy, which require service.image attribute set Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 0c6905a commit 65875cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

render/render.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,13 @@ func render(appPath string, composeContent string, imageMap map[string]bundle.Im
116116
if err := processEnabled(rendered); err != nil {
117117
return nil, err
118118
}
119+
// Apply relocation map
119120
for ix, service := range rendered.Services {
120121
if img, ok := imageMap[service.Name]; ok {
121122
service.Image = img.Image
123+
if img.Image == "" {
124+
service.Image = img.Digest
125+
}
122126
rendered.Services[ix] = service
123127
}
124128
}

0 commit comments

Comments
 (0)