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:
commit
aca9143c13
1 changed files with 4 additions and 5 deletions
|
@ -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)}
|
||||||
|
|
Loading…
Reference in a new issue