-
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 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 :
} |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Testcontainers works OOTB with Docker Desktop on Windows and the now default WSL2 backend. Please share more details about your setup and logs. I also don't understand why you subclass @daschl This is unrelated to |
Beta Was this translation helpful? Give feedback.
-
Hello @kiview,
Now, I want to run integration test cases WSL + intellij on windows machines which gives me error about unable to find docker environment. I would like our developers to work with intellij windows wsl and have ability to run integration tests from intellij. I hope you got my problem statement, let me know if more info is needed. Thanks Vishal |
Beta Was this translation helpful? Give feedback.
-
On Windows Testcontainers only supports Docker Desktop officially. If you run your tests from within WSL with Docker running in WSL, Testcontainers should work OOTB. For making Testcontainers work from the Windows host with a Docker daemon running inside WSL, make sure you configure the Docker daemon to be accessible by the Windows host and configure Testcontainers for a remote Docker daemon connection: I will convert this issue into a GH Discussion question. |
Beta Was this translation helpful? Give feedback.
On Windows Testcontainers only supports Docker Desktop officially.
If you run your tests from within WSL with Docker running in WSL, Testcontainers should work OOTB.
For making Testcontainers work from the Windows host with a Docker daemon running inside WSL, make sure you configure the Docker daemon to be accessible by the Windows host and configure Testcontainers for a remote Docker daemon connection:
https://www.testcontainers.org/features/configuration/#customizing-docker-host-detection
I will convert this issue into a GH Discussion question.