Merge pull request #1629 from masters-of-cats/busybox-inflation

Avoid disk usage explosion when copying busybox
This commit is contained in:
Michael Crosby
2017-11-01 09:15:22 -04:00
committed by GitHub
+1 -1
View File
@@ -109,7 +109,7 @@ func remove(dir string) {
// copyBusybox copies the rootfs for a busybox container created for the test image
// into the new directory for the specific test
func copyBusybox(dest string) error {
out, err := exec.Command("sh", "-c", fmt.Sprintf("cp -R /busybox/* %s/", dest)).CombinedOutput()
out, err := exec.Command("sh", "-c", fmt.Sprintf("cp -a /busybox/* %s/", dest)).CombinedOutput()
if err != nil {
return fmt.Errorf("copy error %q: %q", err, out)
}