Root cause of a not working container runtime strategy is not logged
Expected Behaviour If a container runtime strategy does not work I would expect the root cause to be logged.
Actual Behaviour You get a message that the container runtime strategy does not work, but the real error is swallowed.
Testcontainer Logs
Container runtime strategy UnixSocketStrategy does not work
Steps to Reproduce
Using a Docker runtime remove your user from the docker group.
Environment Information
- Operating System: OpenSUSE Leap 15.5
- Docker Version: 24.0.5-ce, build a61e2b4c9
- Node version: v20.8.1
- Testcontainers version: 10.2.1
I tried to use Testcontainers with Docker runtime, but got the message Container runtime strategy UnixSocketStrategy does not work. I checked the source code and realized that the root cause is not logged, not even catched. So I modified the code locally to catch and log the error. It was connect EACCES /var/run/docker.sock and caused by that my user was not part of the docker group.