testContainers and Rancher

Viewed 1919

I have a Spring Boot application with integration tests that are using testContainers.

Till recently, I used Docker Desktop and was able to easily run the test from within Intellij or from CLI.

Recently I changed my Windows machine to Rancher desktop.

Now when trying to run the integration tests gradle integrationTest I'm getting this error:

Caused by: java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:109) at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:136) at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:178) at org.testcontainers.LazyDockerClient.getDockerClient(LazyDockerClient.java:14) at org.testcontainers.LazyDockerClient.authConfig(LazyDockerClient.java:12) at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:310)

Is there an additional configuration that is needed in Intellij or Rancher or Windows to make it work?

3 Answers

UPDATE Feb 2022: As reported here TestContainers works nicely with Rancher Desktop 1.0.1.

Based on the following two closed issues - first, second - in the testcontainers-java github, Testcontainers doesn't seem to support Rancher Desktop, at least officially.

I'm running rancher desktop version 1.0.0 on my windows mashine and could get testcontainers to work just by simple adding 'checks.disable=true' in .testcontainers.properties (located under C:\Users<your user>)

updating Rancher Desktop to version 1.0.1 fixed this issue for me

Related