diff --git a/dockertest.go b/dockertest.go
index <HASH>..<HASH> 100644
--- a/dockertest.go
+++ b/dockertest.go
@@ -101,7 +101,7 @@ func NewPool(endpoint string) (*Pool, error) {
 		}
 	}
 
-	if os.Getenv("DOCKER_CERT_PATH") == "" && shouldPreferTls(endpoint) {
+	if os.Getenv("DOCKER_CERT_PATH") != "" && shouldPreferTls(endpoint) {
 		return NewTLSPool(endpoint, os.Getenv("DOCKER_CERT_PATH"))
 	}
a TLS pool if DOCKER_CERT_PATH is set (#<I>)