Home > Software design >  testContainers and Rancher
testContainers and Rancher

Time:01-27

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?

CodePudding user response:

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.

  •  Tags:  
  • Related