Skip to content

Commit 20f7b58

Browse files
committed
v1.3.1
1 parent a8237af commit 20f7b58

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/helpers/docker/DockerUtil.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.spotify.docker.client.DockerClient;
66
import com.spotify.docker.client.auth.FixedRegistryAuthSupplier;
77
import com.spotify.docker.client.messages.RegistryAuth;
8+
import play.Logger;
89
import play.Play;
910

1011
import java.net.URI;
@@ -26,17 +27,22 @@ public static DockerClient createDockerClient() {
2627
try {
2728
DefaultDockerClient.Builder builder = DefaultDockerClient.builder();
2829
if (isUseSocket()) {
29-
builder.uri(URI.create("unix:///var/run/docker.sock"));
30+
String socketUri = "unix:///var/run/docker.sock";
31+
Logger.info("Using docker socket: " + socketUri);
32+
builder.uri(URI.create(socketUri));
3033
} else {
3134
if (getDockerCertDir() != null) {
35+
Logger.info("Using docker certificate directory: " + getDockerCertDir());
3236
builder
3337
.uri(URI.create("https://" + getDockerRemoteHost() + ":" + getDockerRemotePort("2376")))
3438
.dockerCertificates(DockerCertificates.builder()
3539
.dockerCertPath(Paths.get(getDockerCertDir()))
3640
.build().orNull());
3741
} else {
42+
Logger.info("Using docker without certificates");
3843
builder.uri(URI.create("http://" + getDockerRemoteHost() + ":" + getDockerRemotePort("2400")));
3944
if (getDockerAuthorization() != null) {
45+
Logger.info("Using docker with basic authorization");
4046
builder.header("Authorization", "Basic " + getDockerAuthorization());
4147
}
4248
}

0 commit comments

Comments
 (0)