Skip to content

Commit

Permalink
Fix docker null host
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino committed Sep 23, 2019
1 parent a7a06d8 commit 2431883
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ public static DockerClient getDockerClient(String host, EnvVars envVars) {
if (envVars.containsKey(DefaultDockerClientConfig.DOCKER_HOST)) {
configBuilder.withDockerHost(envVars.get(DefaultDockerClientConfig.DOCKER_HOST));
} else {
if (!StringUtils.isEmpty(host)) {
// If open JDK is used and the host is null
// then instead of a null reference, the host is the string "null".
if (!StringUtils.isEmpty(host) && !host.equalsIgnoreCase("null")) {
configBuilder.withDockerHost(host);
}
}
Expand Down

0 comments on commit 2431883

Please sign in to comment.