Skip to content

Commit

Permalink
Merge pull request #226 from WaberZhuang/main
Browse files Browse the repository at this point in the history
Exclude baselayer when using mkfs (turboOCI)
  • Loading branch information
liulanzheng authored Sep 20, 2023
2 parents 85d30e2 + 5469bb2 commit 9ac0044
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/convertor/builder/turboOCI_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ func (e *turboOCIBuilderEngine) UploadImage(ctx context.Context) error {
label.OverlayBDBlobSize: "4737695",
},
}
if err := uploadBlob(ctx, e.pusher, overlaybdBaseLayer, baseDesc); err != nil {
return errors.Wrapf(err, "failed to upload baselayer %q", overlaybdBaseLayer)
if !e.mkfs {
if err := uploadBlob(ctx, e.pusher, overlaybdBaseLayer, baseDesc); err != nil {
return errors.Wrapf(err, "failed to upload baselayer %q", overlaybdBaseLayer)
}
e.manifest.Layers = append([]specs.Descriptor{baseDesc}, e.manifest.Layers...)
e.config.RootFS.DiffIDs = append([]digest.Digest{baseDesc.Digest}, e.config.RootFS.DiffIDs...)
}
e.manifest.Layers = append([]specs.Descriptor{baseDesc}, e.manifest.Layers...)
e.config.RootFS.DiffIDs = append([]digest.Digest{baseDesc.Digest}, e.config.RootFS.DiffIDs...)
return e.uploadManifestAndConfig(ctx)
}

Expand Down

0 comments on commit 9ac0044

Please sign in to comment.