archive_windows.go 944 B

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