From 6ea70c5792d4f7761e7ddb19c419ddbb022bb049 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 10 Sep 2022 01:19:12 +0200 Subject: [PATCH] exporter/containerimage/image: Image: remove custom Variant field The OCI image spec now supports has a Variant field, so this custom field is no longer needed. Signed-off-by: Sebastiaan van Stijn --- exporter/containerimage/image/docker_image.go | 3 --- frontend/dockerfile/dockerfile2llb/image.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/exporter/containerimage/image/docker_image.go b/exporter/containerimage/image/docker_image.go index 6d11962cd5bc..a35d811d55cf 100644 --- a/exporter/containerimage/image/docker_image.go +++ b/exporter/containerimage/image/docker_image.go @@ -49,7 +49,4 @@ type Image struct { // Config defines the execution parameters which should be used as a base when running a container using the image. Config ImageConfig `json:"config,omitempty"` - - // Variant defines platform variant. To be added to OCI. - Variant string `json:"variant,omitempty"` } diff --git a/frontend/dockerfile/dockerfile2llb/image.go b/frontend/dockerfile/dockerfile2llb/image.go index ddd7eba8ad9d..36b27aa28aba 100644 --- a/frontend/dockerfile/dockerfile2llb/image.go +++ b/frontend/dockerfile/dockerfile2llb/image.go @@ -24,8 +24,8 @@ func emptyImage(platform ocispecs.Platform) Image { Image: ocispecs.Image{ Architecture: platform.Architecture, OS: platform.OS, + Variant: platform.Variant, }, - Variant: platform.Variant, } img.RootFS.Type = "layers" img.Config.WorkingDir = "/"