+ Builder: ADD of a local file will detect tar archives and unpack them

into the container instead of copying them as a regular file.

* Builder: ADD uses tar/untar for copies instead of calling 'cp -ar'.
	This is more consistent, reduces the number of dependencies, and
	fixe #896.
This commit is contained in:
Solomon Hykes
2013-06-14 16:43:39 -07:00
parent 5799806414
commit 5b8287617d
4 changed files with 38 additions and 10 deletions
+1
View File
@@ -548,6 +548,7 @@ func GetKernelVersion() (*KernelVersionInfo, error) {
}, nil
}
// FIXME: this is deprecated by CopyWithTar in archive.go
func CopyDirectory(source, dest string) error {
if output, err := exec.Command("cp", "-ra", source, dest).CombinedOutput(); err != nil {
return fmt.Errorf("Error copy: %s (%s)", err, output)