diff --git a/docker-java-core/src/main/java/com/github/dockerjava/core/util/CompressArchiveUtil.java b/docker-java-core/src/main/java/com/github/dockerjava/core/util/CompressArchiveUtil.java index 4590abb13..797559077 100644 --- a/docker-java-core/src/main/java/com/github/dockerjava/core/util/CompressArchiveUtil.java +++ b/docker-java-core/src/main/java/com/github/dockerjava/core/util/CompressArchiveUtil.java @@ -98,7 +98,8 @@ public static File archiveTARFiles(File base, Iterable files, String archi tarFile.deleteOnExit(); try (TarArchiveOutputStream tos = new TarArchiveOutputStream(new GZIPOutputStream(new BufferedOutputStream( new FileOutputStream(tarFile))))) { - tos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); + tos.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX); + tos.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX); for (File file : files) { // relativize with method using Path otherwise method with File resolves the symlinks // and this is not want we want. If the file is a symlink, the relativized path should