Skip to content

Commit

Permalink
Merge pull request moby#3619 from tonistiigi/win-osversion
Browse files Browse the repository at this point in the history
set osversion in index descriptor from base image
  • Loading branch information
crazy-max authored Feb 17, 2023
2 parents 65dbbc6 + 2844819 commit dbafcc8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/dockerui/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ func (bc *Client) Build(ctx context.Context, fn BuildFunc) (*ResultBuilder, erro
if tp != nil {
p = *tp
}

// in certain conditions we allow input platform to be extended from base image
if p.OS == "windows" && img.OS == p.OS {
if p.OSVersion == "" && img.OSVersion != "" {
p.OSVersion = img.OSVersion
}
if p.OSFeatures == nil && len(img.OSFeatures) > 0 {
p.OSFeatures = img.OSFeatures
}
}

p = platforms.Normalize(p)
k := platforms.Format(p)

Expand Down

0 comments on commit dbafcc8

Please sign in to comment.