Trying to run simple container
new GenericContainer("nginx").withExposedPorts(80);
INFO [main] [DockerClientProviderStrategy] Found docker-machine, and will use machine named
ERROR [main] [DockerClientProviderStrategy] Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
ERROR [main] [DockerClientProviderStrategy] EnvironmentAndSystemPropertyClientProviderStrategy: failed with exception NoClassDefFoundError (Could not initialize class org.testcontainers.shaded.io.netty.channel.epoll.IovArray)
ERROR [main] [DockerClientProviderStrategy] UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (this strategy is only applicable to Linux)
ERROR [main] [DockerClientProviderStrategy] ProxiedUnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (this strategy is only applicable to OS X and Linux)
ERROR [main] [DockerClientProviderStrategy] DockerMachineClientProviderStrategy: failed with exception InvalidConfigurationException (Exception when executing docker-machine status )
ERROR [main] [DockerClientProviderStrategy] WindowsClientProviderStrategy: failed with exception TimeoutException (Timeout waiting for result with exception). Root cause ConnectException (Connection refused: no further information: localhost/127.0.0.1:2375)
ERROR [main] [DockerClientProviderStrategy] As no valid configuration was found, execution cannot continue
OS: Windows 10
C:\Users>docker --version
Docker version 17.03.1-ce, build c6d412e
C:\Users>docker-compose --version
docker-compose version 1.11.2, build f963d76f
C:\Users>docker-machine --version
docker-machine version 0.10.0, build 76ed2a6
Could you try Docker for Windows?
Couldn't get it working on a colleagues laptop with Windows and Docker Toolbox (Docker-Machine) last week as well, so might be a new compatibility issue with Docker Java Client and Docker Toolbox on Windows?
Try to enable following:
Thanks, that sounds like the solution for my colleague ;)
@alex120fantom Please provide further information if the problem persist, I'll close this issue for now.
The current usage instruction for Testcontainers on Windows are in the docs: https://www.testcontainers.org/usage/windows_support.html
Same problem here with similar errors:
17:15:09.952 [main] ERROR o.t.d.DockerClientProviderStrategy - Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
17:15:09.952 [main] ERROR o.t.d.DockerClientProviderStrategy - NpipeSocketClientProviderStrategy: failed with exception InvalidConfigurationException (ping failed). Root cause TimeoutException (null)
17:15:09.952 [main] ERROR o.t.d.DockerClientProviderStrategy - WindowsClientProviderStrategy: failed with exception TimeoutException (Timeout waiting for result with exception). Root cause ConnectException (Connection refused: connect)
17:15:09.952 [main] ERROR o.t.d.DockerClientProviderStrategy - DockerMachineClientProviderStrategy: failed with exception InvalidConfigurationException (Exception when executing docker-machine status )
17:15:09.952 [main] ERROR o.t.d.DockerClientProviderStrategy - As no valid configuration was found, execution cannot continue
NpipeSocketClientProviderStrategy: failed with exception InvalidConfigurationException (ping failed). Root cause TimeoutException (null)
Are you running Docker for Windows (Hyper-V) or Docker Toolbox (with VirtualBox)?
Hi,
Iam running Docker for Windows (Hyper-V)
Try to enable following:
Is there a way to resolve this without exposing TCP, obviously don't want to be sitting with vulnerabilities on my end?? Did test that if i turn on the exposed option it does connect and seems to work.
@WPanayides which version of Testcontainers are you using?

@bsideup not sure about Testcontainers but using docker desktop
@WPanayides I needed the Testcontainers version :)
@bsideup I'm not using TestContainers i know this is a TC thread, but the issue i was having is exactly the same for Pycharm and the expose option can resolve it.
@WPanayides I would suggest to discuss that in Pycharm's community then.
Testcontainers supports npipe and does not require exposing the TCP port.
Cool thanks :-)
Most helpful comment
Try to enable following:
