-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Regression in v0.13.0 #4387
from mcr.microsoft.com/windows/nanoserver:1809
env foo=bar
docker buildx build -o type=oci --platform windows/amd64 .
The returned image is missing os.version in image config (and descriptor).
98e0d8dcff0f36c15bf23b79b2a84a1af8cc5c97 is the first bad commit
commit 98e0d8dcff0f36c15bf23b79b2a84a1af8cc5c97 (HEAD, refs/bisect/bad)
Author: Paul "TBBle" Hampson <[email protected]>
Date: Fri Oct 27 23:02:14 2023 +0900
Whenever copying OCI Platform data, include OSVersion and OSFeatures
Trivially created by looking for every reference to .Variant and adding
OSVersion and OSFeatures, except the ones related to the string
representation of a Platform instance.
I then went through and ensured every assignment of OSFeatures that
might leak out, i.e., not local-only or for marhsalling purposes, uses
the append-to-nil idiom to avoid sharing the slice storage and allowing
accidental mutation after-the-fact.
Signed-off-by: Paul "TBBle" Hampson <[email protected]>
client/llb/marshal.go | 18 +++++++++++-------
client/llb/state.go | 9 +++++++--
exporter/containerimage/writer.go | 2 ++
frontend/dockerfile/dockerfile2llb/convert.go | 8 ++++++++
frontend/dockerfile/dockerfile2llb/image.go | 4 ++++
frontend/dockerui/build.go | 2 +-
solver/llbsolver/ops/exec.go | 26 ++++++++++++++++----------
solver/llbsolver/ops/exec_binfmt.go | 2 ++
solver/llbsolver/provenance/capture.go | 4 +++-
solver/llbsolver/vertex.go | 14 +++++++++++++-
solver/pb/ops.proto | 2 +-
solver/pb/platform.go | 14 ++++++++++----
source/containerimage/pull.go | 24 ++++++++++++++----------
source/containerimage/source.go | 8 ++++++--
14 files changed, 98 insertions(+), 39 deletions(-)