remove uses of deprecated go-archive consts

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-12-19 17:51:03 +01:00
parent 2142a4444c
commit 7239c72eca
14 changed files with 28 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ import (
"time"
"github.com/moby/go-archive"
"github.com/moby/go-archive/compression"
"github.com/moby/moby/api/types/events"
plugintypes "github.com/moby/moby/api/types/plugin"
"github.com/moby/moby/api/types/registry"
@@ -209,7 +210,7 @@ func makePluginBundle(inPath string, opts ...CreateOpt) (io.ReadCloser, error) {
if err := archive.NewDefaultArchiver().CopyFileWithTar(cfg.binPath, filepath.Join(inPath, "rootfs", p.Entrypoint[0])); err != nil {
return nil, errors.Wrap(err, "error copying plugin binary to rootfs path")
}
tar, err := archive.Tar(inPath, archive.Uncompressed)
tar, err := archive.Tar(inPath, compression.None)
return tar, errors.Wrap(err, "error making plugin archive")
}

View File

@@ -11,6 +11,7 @@ import (
"github.com/distribution/reference"
"github.com/google/uuid"
"github.com/moby/go-archive"
"github.com/moby/go-archive/compression"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/specs-go"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
@@ -137,7 +138,7 @@ func fileArchive(dir string, name string, content []byte) (io.ReadCloser, error)
return nil, err
}
return archive.Tar(tmp, archive.Uncompressed)
return archive.Tar(tmp, compression.None)
}
func writeLayerWithOneFile(dir string, filename string, content []byte) (ocispec.Descriptor, error) {