testcontainers-java
testcontainers-java copied to clipboard
Container with new ImageFromDockerfile().withDockerfile(...) cause java.lang.IllegalArgumentException: group id '...' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit
I upgraded the testcontainers version from 1.15.3 to 1.16.2.
When I try to run test now I am getting:
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=
, imagePullPolicy=DefaultPullPolicy()) at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1326) at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:643) at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:326) ... 37 more Caused by: java.lang.IllegalArgumentException: group id '34548085' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.failForBigNumber(TarArchiveOutputStream.java:651) at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.failForBigNumberWithPosixMessage(TarArchiveOutputStream.java:644) at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.failForBigNumbers(TarArchiveOutputStream.java:626) at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.putArchiveEntry(TarArchiveOutputStream.java:377) at org.testcontainers.shaded.com.github.dockerjava.core.util.CompressArchiveUtil.addFileToTar(CompressArchiveUtil.java:41) at org.testcontainers.shaded.com.github.dockerjava.core.util.CompressArchiveUtil.archiveTARFiles(CompressArchiveUtil.java:106) at org.testcontainers.shaded.com.github.dockerjava.core.dockerfile.Dockerfile$ScannedResult.buildDockerFolderTar(Dockerfile.java:134) at org.testcontainers.shaded.com.github.dockerjava.core.dockerfile.Dockerfile$ScannedResult.buildDockerFolderTar(Dockerfile.java:124) at org.testcontainers.shaded.com.github.dockerjava.core.command.BuildImageCmdImpl.withDockerfile(BuildImageCmdImpl.java:346) at org.testcontainers.shaded.com.github.dockerjava.core.command.BuildImageCmdImpl.withDockerfile(BuildImageCmdImpl.java:23) at org.testcontainers.images.builder.ImageFromDockerfile.lambda$configure$0(ImageFromDockerfile.java:154) at java.base/java.util.Optional.ifPresent(Optional.java:178) at org.testcontainers.images.builder.ImageFromDockerfile.configure(ImageFromDockerfile.java:153) at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:109) at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:37) at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17) at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39) at org.testcontainers.shaded.com.google.common.util.concurrent.Futures$3.get(Futures.java:1332) at org.testcontainers.images.RemoteDockerImage.getImageName(RemoteDockerImage.java:115) at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:64) at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:28) at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17) at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39) at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1324) ... 39 more
I am using ImageFromDockerfile().withDockerfile(Path.of("./../some_path/Dockerfile")) to create the container. What I see it fails on:
org.testcontainers.shaded.com.github.dockerjava.core.dockerfile.Dockerfile.ScannedResult#buildDockerFolderTar(java.io.File)
Previously, when I was using version 1.15.3 it was working fine. Note: I am running on MacOs, on Linux it works fine.
I can confirm this error on MacOs. Seems like this has te be solved in docker-java library.
After some investigation I have created an issue for github project docker-java/docker-java: https://github.com/docker-java/docker-java/issues/1747
We have the same issue on MacOS after upgrading.
Seems @murat3's fix is merged into docker-java and the issue is closed there. Hoping we can have a new release with the updated version using POSIX extensions! 🤞🏻
We have the same problem i saw you are already updated the dependency, I hope to see a new release soon.
The Issue from should be included in Version docker-java 3.2.13:
https://github.com/docker-java/docker-java/releases/tag/3.2.13#:~:text=tar%20archives%20%40Kent1%20(-,%231787,-)
Use POSIX extensions for tar archives @Kent1 (https://github.com/docker-java/docker-java/pull/1787)
Hi @rnorth or somebody of the Testcontainer Team,
please can you release a new Release or RC with the new docker-java Version 3.2.13,
I have seen your already updated the dependencies to this version ;-) - kind regards.
I'm also having this problem. I look forward to the testcontainer library update. In the meantime, what version of the testcontainer dependency are you using? I tested using version 1.16.0 of the dependency and it worked.
In version 1.17.6 (and perhaps earlier), we're including docker-java-api 3.2.13, so this issue should be able to be closed now, right? I don't believe the issuer is happening now (but I can't confirm 100% I saw it earlier either).