{"action":"created","issue":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/204","repository_url":"https://api.github.com/repos/testcontainers/testcontainers-java","labels_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/204/comments","events_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/204/events","html_url":"https://github.com/testcontainers/testcontainers-java/issues/204","id":171533604,"number":204,"title":"ping timeout of 1s too low in DockerClientProviderStrategy","user":{"login":"kunickiaj","id":746474,"avatar_url":"https://avatars.githubusercontent.com/u/746474?v=3","gravatar_id":"","url":"https://api.github.com/users/kunickiaj","html_url":"https://github.com/kunickiaj","followers_url":"https://api.github.com/users/kunickiaj/followers","following_url":"https://api.github.com/users/kunickiaj/following{/other_user}","gists_url":"https://api.github.com/users/kunickiaj/gists{/gist_id}","starred_url":"https://api.github.com/users/kunickiaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunickiaj/subscriptions","organizations_url":"https://api.github.com/users/kunickiaj/orgs","repos_url":"https://api.github.com/users/kunickiaj/repos","events_url":"https://api.github.com/users/kunickiaj/events{/privacy}","received_events_url":"https://api.github.com/users/kunickiaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-08-16T22:31:44Z","updated_at":"2016-09-11T20:22:28Z","closed_at":null,"body":"Wondering if anyone else has experienced the following...\r\n\r\nWe upgraded from Docker 1.10 / testcontainers 1.0.5 -> Docker 1.12 / testcontainers 1.1.3.\r\n\r\nSince then it seems that the DOCKER_HOST environment variable is not always used by the docker client. I've verified with a debugger that it is in fact set.\r\n\r\nGenerally this results in an error like the following:\r\n\r\n```\r\n2016-08-16 21:18:29,049 INFO  DockerClientProviderStrategy - Looking for Docker environment. Trying Environment variables, system properties and defaults. Resolved: \r\n\r\n2016-08-16 21:18:32,870 INFO  DockerClientProviderStrategy - Looking for Docker environment. Trying local Unix socket (via TCP proxy)\r\n2016-08-16 21:18:32,870 INFO  DockerClientProviderStrategy - Looking for Docker environment. Trying local Unix socket (unix:///var/run/docker.sock)\r\n2016-08-16 21:18:32,898 INFO  DockerClientProviderStrategy - Looking for Docker environment. Trying docker-machine\r\n2016-08-16 21:18:32,908 ERROR DockerClientProviderStrategy - Could not find a valid Docker environment. Please check configuration. Attempted configurations were:\r\n2016-08-16 21:18:32,908 ERROR DockerClientProviderStrategy -     EnvironmentAndSystemPropertyClientProviderStrategy: failed with exception InvalidConfigurationException (ping failed)\r\n2016-08-16 21:18:32,908 ERROR DockerClientProviderStrategy -     ProxiedUnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (this strategy is only applicable to OS X)\r\n2016-08-16 21:18:32,908 ERROR DockerClientProviderStrategy -     UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (ping failed). Root cause NoSuchFileException (/var/run/docker.sock)\r\n2016-08-16 21:18:32,908 ERROR DockerClientProviderStrategy -     DockerMachineClientProviderStrategy: failed with exception InvalidConfigurationException (docker-machine executable was not found on PATH ([/opt/tools/hudson.tasks.Maven_MavenInstallation/maven3/bin, /opt/tools/hudson.model.JDK/Oracle_Java_8/bin, /opt/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_Stable/bin, /opt/tools/hudson.model.JDK/Oracle_Java_8/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin]))\r\n2016-08-16 21:18:32,908 ERROR DockerClientProviderStrategy - As no valid configuration was found, execution cannot continue\r\n```"},"comment":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/comments/246202147","html_url":"https://github.com/testcontainers/testcontainers-java/issues/204#issuecomment-246202147","issue_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/204","id":246202147,"user":{"login":"rnorth","id":132175,"avatar_url":"https://avatars.githubusercontent.com/u/132175?v=3","gravatar_id":"","url":"https://api.github.com/users/rnorth","html_url":"https://github.com/rnorth","followers_url":"https://api.github.com/users/rnorth/followers","following_url":"https://api.github.com/users/rnorth/following{/other_user}","gists_url":"https://api.github.com/users/rnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/rnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnorth/subscriptions","organizations_url":"https://api.github.com/users/rnorth/orgs","repos_url":"https://api.github.com/users/rnorth/repos","events_url":"https://api.github.com/users/rnorth/events{/privacy}","received_events_url":"https://api.github.com/users/rnorth/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T20:22:28Z","updated_at":"2016-09-11T20:22:28Z","body":"@kunickiaj thanks. To be honest the reason is just that these timeouts have been 'what works' when each of the strategies was added. Docker Machine support was a bit of an outlier at 30s because testcontainers itself can launch the Machine VM - but the VM takes a while to be ready.\r\n\r\nWe could probably standardise for all to be a long-ish timeout (30s) _but_ only where the strategy will fail fast if it's absent. e.g. if a host doesn't has a unix socket for docker but not TCP, we don't want testcontainers sitting around for 30s waiting for TCP to respond.\r\n\r\nIt's probably not a big deal, but we need to think about each strategy case-by-case!"}}
{"actor":{"display_login":"rnorth"}}