Quarkus BOM breaks Testcontainers starting with 1.16.0
See original GitHub issueHi, I tried to update testcontainer from version 1.15.3 to 1.16.0 and my tests crashed with the following error:
java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
This is my test:
@Testcontainers
public class testContainer {
@Test
public void containerWithInitScriptShouldWork() {
Jdbi jdbi = Jdbi.create("jdbc:tc:postgis:13-3.1:///testWIthData?TC_INITSCRIPT=sql/init_sql.sql")
.installPlugin(new PostgresPlugin())
.installPlugin(new Jackson2Plugin());
List<Map<String, Object>> values = jdbi.withHandle(handle ->
handle.createQuery("select ID, LAST_NAME, FIRST_NAME from users")
.mapToMap().list());
assertEquals(1, values.size());
Map<String, Object> data = values.get(0);
assertEquals(1, data.get("id"));
assertEquals("Doe", data.get("last_name"));
assertEquals("John", data.get("first_name"));
}
}
I tried on macOS and Linux but neither worked (same for Github actions).
Application:
- Java 11
- Quarkus
- maven
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Custom configuration - Testcontainers for Java
Disabling Ryuk. Ryuk must be started as a privileged container. If your environment already implements automatic cleanup of containers after the execution, but ......
Read more >Apache camel 3.12.0 Release
This version supports Java 8 and 11. Getting the Binaries using Maven. To use this release in your Apache Maven pom.xml , import...
Read more >Central Repository: org/testcontainers/testcontainers-bom/1.16.0
org/testcontainers/testcontainers-bom/1.16.0 ../ testcontainers-bom-1.16.0.pom 2021-07-20 13:54 7066 testcontainers-bom-1.16.0.pom.asc 2021-07-20 13:54 801 ...
Read more >junit - Testcontainers - postgres + Quarkus test resulting in ...
Quarkus 2.0+ includes a new system call devServices which uses internally testcontainers to setup a development an testing environment for ...
Read more >Quarkus: Supersonic Subatomic Java. - JavaRepos
I have created integration tests that leverage testcontainers to start and configure a complete vault+postgres system. see VaultTestExtension ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have no idea why, but Quarkus’ BOM forces
docker-java-apiversion to3.2.8: https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/2.0.3.Final/quarkus-bom-2.0.3.Final.pomThis will break your project. Consider reporting to the Quarkus team and temporary forcing
docker-java-apianddocker-java-transport-zerodepto the version that Testcontainers defines (3.2.11as per https://mvnrepository.com/artifact/org.testcontainers/testcontainers/1.16.0)./cc @Ladicek who added the enforcement in https://github.com/quarkusio/quarkus/commit/11f2e68f8c0ac6627b1b0c87e5b675a6dee857f2
Ah one general recommendation for Maven, though. If you add the Maven Enforcer plugin and enable dependency convergence check, that helps a lot. Something like this: