You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test containers failed to start reporting "Could not find a valid Docker environment. Please see logs and check configuration"
with the following in the logs WARNING: DOCKER_HOST unix:///var/run/docker.sock is not listening
This is incorrect and missleading as verified by running the docker command.
After much confusion it was realized that the docker.sock did exist but was not available (rw) to the current user (the docker binary was suid)
Relevant log output
WARNING: DOCKER_HOST unix:///var/run/docker.sock is not listening
Additional Information
this problem would still happen in the latest version.
Module
Core
Testcontainers version
1.19.8
Using the latest Testcontainers version?
No
Host OS
Linux
Host Arch
amd64
Docker version
What happened?
Test containers failed to start reporting
"Could not find a valid Docker environment. Please see logs and check configuration"
with the following in the logs
WARNING: DOCKER_HOST unix:///var/run/docker.sock is not listening
This is incorrect and missleading as verified by running the docker command.
After much confusion it was realized that the docker.sock did exist but was not available (
rw
) to the current user (the docker binary wassuid
)Relevant log output
Additional Information
this problem would still happen in the latest version.
testcontainers-java/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java
Lines 187 to 190 in 0217e78
If the file is not read/write for the current user, but exists, you fall through to
testcontainers-java/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java
Lines 209 to 222 in 0217e78
Can most likely be easily reproduced by attempting to run test-containers as a user that is not a member of the
docker
groupThe text was updated successfully, but these errors were encountered: