We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f84bcd6 commit a2a59bcCopy full SHA for a2a59bc
core/src/main/java/org/testcontainers/DockerClientFactory.java
@@ -101,6 +101,19 @@ public synchronized static DockerClientFactory instance() {
101
return instance;
102
}
103
104
+ /**
105
+ * Checks whether Docker is accessible and {@link #client()} is able to produce a client.
106
+ * @return true if Docker is available, false if not.
107
+ */
108
+ public synchronized boolean isDockerAvailable() {
109
+ try {
110
+ client();
111
+ return true;
112
+ } catch (IllegalStateException ex) {
113
+ return false;
114
+ }
115
116
+
117
@Synchronized
118
private DockerClientProviderStrategy getOrInitializeStrategy() {
119
if (strategy != null) {
0 commit comments