moby--moby/builder
Sebastiaan van Stijn 6d6a236286
[20.10] Update uses of Image platform fields in OCI image-spec
The OCI image spec is considering to change the Image struct and embedding the
Platform type (see opencontainers/image-spec#959) in the go implementation.
Moby currently uses some struct-literals to propagate the platform fields,
which will break once those changes in the OCI spec are merged.

Ideally (once that change arrives) we would update the code to set the Platform
information as a whole, instead of assigning related fields individually, but
in some cases in the code, image platform information is only partially set
(for example, OSVersion and OSFeatures are not preserved in all cases). This
may be on purpose, so needs to be reviewed.

This patch keeps the current behavior (assigning only specific fields), but
removes the use of struct-literals to make the code compatible with the
upcoming changes in the image-spec module.

(similar to commit 3cb933db9d)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-10 12:25:17 +02:00
..
builder-next [20.10] Update uses of Image platform fields in OCI image-spec 2022-09-10 12:25:17 +02:00
dockerfile gosec: G601: Implicit memory aliasing in for loop 2022-08-17 18:10:55 +02:00
dockerignore vendor buildkit 6861f17f15364de0fe1fd1e6e8da07598a485123 2020-11-14 03:57:36 +00:00
remotecontext Use golang.org/x/sys/execabs 2021-01-28 21:33:12 +00:00
builder.go Windows: (WCOW) Generate OCI spec that remote runtime can escape 2019-03-12 18:41:55 -07:00