org.testcontainers.junit.jupiter.DockerAvailableDetector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit-jupiter Show documentation
Show all versions of junit-jupiter Show documentation
Isolated container management for Java code testing
The newest version!
package org.testcontainers.junit.jupiter;
import org.testcontainers.DockerClientFactory;
class DockerAvailableDetector {
public boolean isDockerAvailable() {
try {
DockerClientFactory.instance().client();
return true;
} catch (Throwable ex) {
return false;
}
}
}