mirror of
https://github.com/mudler/luet.git
synced 2025-09-26 15:15:31 +00:00
bump github.com/moby/buildkit to v0.13.0 (#351)
* bump github.com/moby/buildkit to v0.13.0 Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> * fix: update dep usage based on newer version Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> * remove empty line Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> * ci: bump golang to 1.21.x * Bump moby * debug --------- Signed-off-by: Nianyu Shen <nianyu@spectrocloud.com> Co-authored-by: Nianyu Shen <nianyu@spectrocloud.com>
This commit is contained in:
committed by
GitHub
parent
c47bf4833a
commit
4c788ccbd1
20
vendor/github.com/google/go-containerregistry/pkg/crane/export.go
generated
vendored
20
vendor/github.com/google/go-containerregistry/pkg/crane/export.go
generated
vendored
@@ -22,8 +22,26 @@ import (
|
||||
)
|
||||
|
||||
// Export writes the filesystem contents (as a tarball) of img to w.
|
||||
// If img has a single layer, just write the (uncompressed) contents to w so
|
||||
// that this "just works" for images that just wrap a single blob.
|
||||
func Export(img v1.Image, w io.Writer) error {
|
||||
layers, err := img.Layers()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(layers) == 1 {
|
||||
// If it's a single layer, we don't have to flatten the filesystem.
|
||||
// An added perk of skipping mutate.Extract here is that this works
|
||||
// for non-tarball layers.
|
||||
l := layers[0]
|
||||
rc, err := l.Uncompressed()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = io.Copy(w, rc)
|
||||
return err
|
||||
}
|
||||
fs := mutate.Extract(img)
|
||||
_, err := io.Copy(w, fs)
|
||||
_, err = io.Copy(w, fs)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user