Use PAX tar format

This commit is contained in:
Travis DePrato 2021-10-29 11:35:30 -07:00
parent ee31dc93b6
commit 74100076c9
No known key found for this signature in database
GPG Key ID: 1FB342B890F99392
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ func (t *Tar) AddFileToTar(p string) error {
// this makes this layer unnecessarily differ from a cached layer which does contain this information
hdr.Uname = ""
hdr.Gname = ""
// use PAX format to preserve accurate mtime (match Docker behavior)
hdr.Format = tar.FormatPAX
hardlink, linkDst := t.checkHardlink(p, i)
if hardlink {