Skip to content

Commit df7294a

Browse files
author
Robert Szymczak
committed
Update DockerClientBuilder.java
Added method to allow changing the ClassPath used by ServiceLoader.
1 parent 7b42a5c commit df7294a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/github/dockerjava/core/DockerClientBuilder.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public DockerClientBuilder withDockerCmdExecFactory(
4848
this.dockerCmdExecFactory = dockerCmdExecFactory;
4949
return this;
5050
}
51+
52+
public DockerClientBuilder withServiceLoaderClassPath(ClassPath classPath)
53+
{
54+
serviceLoader = ServiceLoader.load(DockerCmdExecFactory.class, classPath);
55+
return this;
56+
}
5157

5258
public DockerClient build() {
5359
if(dockerCmdExecFactory != null) {

0 commit comments

Comments
 (0)