Merge pull request #44125 from thaJeztah/image_spec_no_literal

Update uses of Image platform fields in OCI image-spec
This commit is contained in:
Brian Goff 2022-09-15 13:49:51 -07:00 committed by GitHub
commit 0f2376d58e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,11 +22,10 @@ import (
func emptyImageConfig() ([]byte, error) {
pl := platforms.Normalize(platforms.DefaultSpec())
img := ocispec.Image{
Architecture: pl.Architecture,
OS: pl.OS,
Variant: pl.Variant,
}
img := ocispec.Image{}
img.Architecture = pl.Architecture
img.OS = pl.OS
img.Variant = pl.Variant
img.RootFS.Type = "layers"
img.Config.WorkingDir = "/"
img.Config.Env = []string{"PATH=" + system.DefaultPathEnv(pl.OS)}