Merge pull request #3141 from masterzen/fix/3091-enforce-PAX-for-all-files

Fix #3091 enforce all outgoing tar files to use PAX
This commit is contained in:
Justin Cormack 2018-07-29 11:35:48 -07:00 committed by GitHub
commit 4968390a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,6 +140,9 @@ func ImageTar(ref *reference.Spec, prefix string, tw tarWriter, trust bool, pull
if err != nil {
return err
}
// force PAX format, since it allows for unlimited Name/Linkname
// and we move all files below prefix.
hdr.Format = tar.FormatPAX
if exclude[hdr.Name] {
log.Debugf("image tar: %s %s exclude %s", ref, prefix, hdr.Name)
_, err = io.Copy(ioutil.Discard, tr)