From 8239ccf7fb672485f57273da14e9e9e427fb8d6f Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Thu, 18 Jun 2020 21:24:52 +0300 Subject: [PATCH] ACS-283: Fix DockerClient instantiation on ubuntu:xenial (Travis agents) --- .../alfresco/rest/rm/community/util/DockerHelper.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/DockerHelper.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/DockerHelper.java index 2583064b61..a46cd44e5c 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/DockerHelper.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/util/DockerHelper.java @@ -38,6 +38,7 @@ import com.github.dockerjava.api.model.Container; import com.github.dockerjava.api.model.Frame; import com.github.dockerjava.core.DockerClientBuilder; import com.github.dockerjava.core.command.LogContainerResultCallback; +import com.github.dockerjava.netty.NettyDockerCmdExecFactory; import lombok.Getter; import lombok.Setter; @@ -68,11 +69,17 @@ public class DockerHelper { if (SystemUtils.IS_OS_WINDOWS) { - this.dockerClient = DockerClientBuilder.getInstance(dockerHost).build(); + this.dockerClient = DockerClientBuilder + .getInstance(dockerHost) + .withDockerCmdExecFactory(new NettyDockerCmdExecFactory()) + .build(); } else { - this.dockerClient = DockerClientBuilder.getInstance().build(); + this.dockerClient = DockerClientBuilder + .getInstance() + .withDockerCmdExecFactory(new NettyDockerCmdExecFactory()) + .build(); } }