Skip to content

Commit 38ee502

Browse files
authored
Use POSIX extensions for tar archives (docker-java#1787)
Closes docker-java#1747 triggered error like ``` group id '1718009175' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit ``` Use POSIX/PAX extensions to store big numbers in the archive. Use POSIX/PAX extensions to store long file names in the archive.
1 parent a31aff8 commit 38ee502

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker-java-core/src/main/java/com/github/dockerjava/core/util/CompressArchiveUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public static File archiveTARFiles(File base, Iterable<File> files, String archi
9898
tarFile.deleteOnExit();
9999
try (TarArchiveOutputStream tos = new TarArchiveOutputStream(new GZIPOutputStream(new BufferedOutputStream(
100100
new FileOutputStream(tarFile))))) {
101-
tos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
101+
tos.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX);
102+
tos.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX);
102103
for (File file : files) {
103104
// relativize with method using Path otherwise method with File resolves the symlinks
104105
// and this is not want we want. If the file is a symlink, the relativized path should

0 commit comments

Comments
 (0)