Below error appears when i run my integration tests through WSL docker.
Error : Caused by: java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$4(DockerClientProviderStrategy.java:156)
Note : Integration tests are able to find docker environment when I have have docker desktop/docker installation on windows machine.
Any hints on how to run these with intellij + WSL would be appreciated.
More info on the way I create container :
{
private static final DockerImageName COUCHBASE_IMAGE = DockerImageName.parse("couchbase/server:7.0.0");
public static final String USERNAME = "admin";
public static final String PASSWORD = "admin1";
public static final String BUCKET_NAME = "designer";
public static class CouchbaseContainerStartable extends CouchbaseContainer {
public CouchbaseContainerStartable(DockerImageName dockerImageName) {
super(dockerImageName);
}
public CouchbaseContainer startCouchbase() {
super.start();
configureBucketScope();
configureBucketCollection();
return this;
}
}