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?
sudo
access is required to be able to boot up containers from testcontainers. – Seeker