Skip to content

Commit 2844819

Browse files
committed
set osversion in index descriptor from base image
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 71a3a18 commit 2844819

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

frontend/dockerui/build.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ func (bc *Client) Build(ctx context.Context, fn BuildFunc) (*ResultBuilder, erro
5050
if tp != nil {
5151
p = *tp
5252
}
53+
54+
// in certain conditions we allow input platform to be extended from base image
55+
if p.OS == "windows" && img.OS == p.OS {
56+
if p.OSVersion == "" && img.OSVersion != "" {
57+
p.OSVersion = img.OSVersion
58+
}
59+
if p.OSFeatures == nil && len(img.OSFeatures) > 0 {
60+
p.OSFeatures = img.OSFeatures
61+
}
62+
}
63+
5364
p = platforms.Normalize(p)
5465
k := platforms.Format(p)
5566

0 commit comments

Comments
 (0)