Skip to content

Commit

Permalink
Merge pull request #47175 from corhere/best-effort-xattrs-classic-bui…
Browse files Browse the repository at this point in the history
…lder

builder/dockerfile: ADD with best-effort xattrs
  • Loading branch information
thaJeztah committed Feb 22, 2024
2 parents 842d1b3 + 5bcd2f6 commit 1ffaf46
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion builder/dockerfile/copy.go
Expand Up @@ -459,7 +459,16 @@ func performCopyForInfo(dest copyInfo, source copyInfo, options copyFileOptions)
return copyDirectory(archiver, srcPath, destPath, options.identity)
}
if options.decompress && archive.IsArchivePath(srcPath) && !source.noDecompress {
return archiver.UntarPath(srcPath, destPath)
f, err := os.Open(srcPath)
if err != nil {
return err
}
defer f.Close()
options := &archive.TarOptions{
IDMap: archiver.IDMapping,
BestEffortXattrs: true,
}
return archiver.Untar(f, destPath, options)
}

destExistsAsDir, err := isExistingDirectory(destPath)
Expand Down

0 comments on commit 1ffaf46

Please sign in to comment.