2015-05-14 22:08:00 +00:00
|
|
|
package chrootarchive
|
|
|
|
|
2015-06-01 23:42:27 +00:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"github.com/docker/docker/pkg/archive"
|
|
|
|
)
|
|
|
|
|
2015-05-14 22:08:00 +00:00
|
|
|
// chroot is not supported by Windows
|
|
|
|
func chroot(path string) error {
|
|
|
|
return nil
|
|
|
|
}
|
2015-06-01 23:42:27 +00:00
|
|
|
|
|
|
|
func invokeUnpack(decompressedArchive io.ReadCloser,
|
|
|
|
dest string,
|
|
|
|
options *archive.TarOptions) error {
|
|
|
|
// Windows is different to Linux here because Windows does not support
|
|
|
|
// chroot. Hence there is no point sandboxing a chrooted process to
|
|
|
|
// do the unpack. We call inline instead within the daemon process.
|
|
|
|
return archive.Unpack(decompressedArchive, dest, options)
|
|
|
|
}
|