github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/pkg/chrootarchive/archive_windows.go (about)

     1  package chrootarchive // import "github.com/Prakhar-Agarwal-byte/moby/pkg/chrootarchive"
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/Prakhar-Agarwal-byte/moby/pkg/archive"
     7  	"github.com/Prakhar-Agarwal-byte/moby/pkg/longpath"
     8  )
     9  
    10  func invokeUnpack(decompressedArchive io.ReadCloser, dest string, options *archive.TarOptions, root string) error {
    11  	// Windows is different to Linux here because Windows does not support
    12  	// chroot. Hence there is no point sandboxing a chrooted process to
    13  	// do the unpack. We call inline instead within the daemon process.
    14  	return archive.Unpack(decompressedArchive, longpath.AddPrefix(dest), options)
    15  }
    16  
    17  func invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {
    18  	// Windows is different to Linux here because Windows does not support
    19  	// chroot. Hence there is no point sandboxing a chrooted process to
    20  	// do the pack. We call inline instead within the daemon process.
    21  	return archive.TarWithOptions(srcPath, options)
    22  }