@@ -530,11 +530,10 @@ func (ic *ImageWriter) Applier() diff.Applier {
530
530
func defaultImageConfig () ([]byte , error ) {
531
531
pl := platforms .Normalize (platforms .DefaultSpec ())
532
532
533
- img := ocispecs.Image {
534
- Architecture : pl .Architecture ,
535
- OS : pl .OS ,
536
- Variant : pl .Variant ,
537
- }
533
+ img := ocispecs.Image {}
534
+ img .Architecture = pl .Architecture
535
+ img .OS = pl .OS
536
+ img .Variant = pl .Variant
538
537
img .RootFS .Type = "layers"
539
538
img .Config .WorkingDir = "/"
540
539
img .Config .Env = []string {"PATH=" + system .DefaultPathEnv (pl .OS )}
@@ -543,13 +542,12 @@ func defaultImageConfig() ([]byte, error) {
543
542
}
544
543
545
544
func attestationsConfig (layers []ocispecs.Descriptor ) ([]byte , error ) {
546
- img := ocispecs.Image {
547
- Architecture : intotoPlatform .Architecture ,
548
- OS : intotoPlatform .OS ,
549
- OSVersion : intotoPlatform .OSVersion ,
550
- OSFeatures : intotoPlatform .OSFeatures ,
551
- Variant : intotoPlatform .Variant ,
552
- }
545
+ img := ocispecs.Image {}
546
+ img .Architecture = intotoPlatform .Architecture
547
+ img .OS = intotoPlatform .OS
548
+ img .OSVersion = intotoPlatform .OSVersion
549
+ img .OSFeatures = intotoPlatform .OSFeatures
550
+ img .Variant = intotoPlatform .Variant
553
551
img .RootFS .Type = "layers"
554
552
for _ , layer := range layers {
555
553
img .RootFS .DiffIDs = append (img .RootFS .DiffIDs , digest .Digest (layer .Annotations ["containerd.io/uncompressed" ]))
0 commit comments