Skip to content

Commit

Permalink
Update to docker-java 3.2.7 (#3577)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup committed Dec 10, 2020
1 parent af678a3 commit c3a8ca7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ dependencies {

compile 'org.rnorth.visible-assertions:visible-assertions:2.1.2'

compile "com.github.docker-java:docker-java-api:3.2.6"
compile "com.github.docker-java:docker-java-api:3.2.7"

shaded ('com.github.docker-java:docker-java-core:3.2.6') {
shaded ('com.github.docker-java:docker-java-core:3.2.7') {
exclude(group: 'com.github.docker-java', module: 'docker-java-api')
exclude(group: 'com.github.docker-java', module: 'docker-java-transport')
exclude(group: 'com.fasterxml.jackson.core', module: 'jackson-annotations')
Expand All @@ -184,13 +184,13 @@ dependencies {
exclude(group: 'org.apache.commons', module: 'commons-compress')
}

shaded ('com.github.docker-java:docker-java-transport-okhttp:3.2.6') {
shaded ('com.github.docker-java:docker-java-transport-okhttp:3.2.7') {
exclude(group: 'com.github.docker-java', module: 'docker-java-core')
exclude(group: 'net.java.dev.jna')
exclude(group: 'org.slf4j')
}

compile 'com.github.docker-java:docker-java-transport-zerodep:3.2.6'
compile 'com.github.docker-java:docker-java-transport-zerodep:3.2.7'

shaded "org.yaml:snakeyaml:1.27"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.github.dockerjava.api.model.Network;
import com.github.dockerjava.core.DefaultDockerClientConfig;
import com.github.dockerjava.core.DockerClientImpl;
import com.github.dockerjava.core.RemoteApiVersion;
import com.github.dockerjava.okhttp.OkDockerHttpClient;
import com.github.dockerjava.transport.DockerHttpClient;
import com.github.dockerjava.zerodep.ZerodepDockerHttpClient;
Expand Down Expand Up @@ -236,9 +237,14 @@ public static DockerClient getClientForConfig(TransportConfig transportConfig) {
throw new IllegalArgumentException("Unknown transport type '" + transportType + "'");
}

DefaultDockerClientConfig.Builder configBuilder = DefaultDockerClientConfig.createDefaultConfigBuilder();

if (configBuilder.build().getApiVersion() == RemoteApiVersion.UNKNOWN_VERSION) {
configBuilder.withApiVersion(RemoteApiVersion.VERSION_1_30);
}
return DockerClientImpl.getInstance(
new AuthDelegatingDockerClientConfig(
DefaultDockerClientConfig.createDefaultConfigBuilder()
configBuilder
.withDockerHost(transportConfig.getDockerHost().toString())
.build()
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class GenericContainerTest {
public void shouldReportOOMAfterWait() {
Info info = DockerClientFactory.instance().client().infoCmd().exec();
// Poor man's rootless Docker detection :D
Assumptions.assumeThat(info.getDriver()).doesNotContain("vfs");
Assumptions.assumeThat(info.getSecurityOptions()).doesNotContain("rootless");
try (
GenericContainer<?> container = new GenericContainer<>(TestImages.TINY_IMAGE)
.withStartupCheckStrategy(new NoopStartupCheckStrategy())
Expand Down

0 comments on commit c3a8ca7

Please sign in to comment.