1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #44126 from thaJeztah/22.06_backport_image_spec_no_literal

[22.06 backport] Update uses of Image platform fields in OCI image-spec
This commit is contained in:
Sebastiaan van Stijn 2022-09-22 19:01:11 +02:00 committed by GitHub
commit aca9143c13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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