Current behavior
I am encountering an issue where tests are failing because the Docker Daemon cannot be recognized. Below is the relevant log trace:
18:32:26.686 [pool-275-thread-15] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy - Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)
As no valid configuration was found, execution cannot continue.
See https://java.testcontainers.org/on_failure.html for more details.
[error] Error starting Elasticsearch container: {java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration}
[error] Error starting PostgreSQL container: {java.lang.IllegalStateException: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration}

The tests fail with errors indicating that a valid Docker environment could not be found.
Expected Behavior
The tests should recognize the Docker Daemon and start the required containers without errors.
Extra comments
Additional Information
- Docker is installed and running on the system.
- The Docker Daemon is accessible and other Docker commands work as expected.
Environment
- Operating System:
macOS
- Docker Version:
Docker version 28.0.0, build f9ced58158
- Testcontainers Version:
"org.testcontainers" % "postgresql" % "1.20.6",
"org.testcontainers" % "elasticsearch" % "1.20.6",
"org.tpolecat" %% "doobie-postgres" % "0.13.4"
Search terms
No response
Current behavior
I am encountering an issue where tests are failing because the Docker Daemon cannot be recognized. Below is the relevant log trace:
The tests fail with errors indicating that a valid Docker environment could not be found.
Expected Behavior
The tests should recognize the
Docker Daemonand start the required containers without errors.Extra comments
Additional Information
Environment
macOSDocker version 28.0.0, build f9ced58158Search terms
No response