File tree 3 files changed +12
-3
lines changed
src/main/java/com/arakelian/docker/junit
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ Add the following to your `pom.xml`:
102
102
<dependency >
103
103
<groupId >com.arakelian</groupId >
104
104
<artifactId >docker-junit-rule</artifactId >
105
- <version >4.0.7 </version >
105
+ <version >4.1.0 </version >
106
106
<scope >test</scope >
107
107
</dependency >
108
108
```
@@ -117,7 +117,7 @@ repositories {
117
117
}
118
118
119
119
dependencies {
120
- testCompile 'com.arakelian:docker-junit-rule:4.0.7 '
120
+ testCompile 'com.arakelian:docker-junit-rule:4.1.0 '
121
121
}
122
122
```
123
123
Original file line number Diff line number Diff line change @@ -292,7 +292,8 @@ private String createContainer() {
292
292
293
293
protected DockerClient createDockerClient () throws DockerClientException {
294
294
try {
295
- final DockerClient dockerClient = DockerClientImpl .getInstance () //
295
+ final DockerClient dockerClient = DockerClientImpl //
296
+ .getInstance (config .getDockerClientConfig ()) //
296
297
.withDockerCmdExecFactory (new OkHttpDockerCmdExecFactory ());
297
298
return dockerClient ;
298
299
} catch (final IllegalStateException | IllegalArgumentException e ) {
Original file line number Diff line number Diff line change 23
23
24
24
import org .immutables .value .Value ;
25
25
26
+ import com .github .dockerjava .core .DefaultDockerClientConfig ;
27
+ import com .github .dockerjava .core .DockerClientConfig ;
26
28
import com .google .common .collect .ImmutableList ;
27
29
28
30
/**
@@ -70,6 +72,12 @@ public List<HostConfigConfigurer> getHostConfigConfigurer() {
70
72
*/
71
73
public abstract String getImage ();
72
74
75
+ @ Value .Default
76
+ @ Value .Auxiliary
77
+ public DockerClientConfig getDockerClientConfig () {
78
+ return DefaultDockerClientConfig .createDefaultConfigBuilder ().build ();
79
+ }
80
+
73
81
/**
74
82
* Returns a list of listeners which are called when the container is started.
75
83
*
You can’t perform that action at this time.
0 commit comments