|
|
@@ -31,12 +31,13 @@ import java.util.stream.Collectors;
|
|
|
public class DockerImpl implements Docker {
|
|
|
private DockerClient dockerClient;
|
|
|
private final TextFile textFile = new TextFile();
|
|
|
+ private final String unixSock = "/var/run/docker.sock";
|
|
|
|
|
|
public DockerImpl() {
|
|
|
DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
|
|
|
- .withDockerHost("unix:///var/run/docker.sock")
|
|
|
+ .withDockerHost("unix://" + unixSock)
|
|
|
.withDockerTlsVerify(false)
|
|
|
- .withDockerCertPath(String.format("%s/.docker", System.getProperty("user.home")))
|
|
|
+ //.withDockerCertPath(String.format("%s/.docker", System.getProperty("user.home")))
|
|
|
//.withRegistryUsername("username")
|
|
|
//.withRegistryPassword("password")
|
|
|
//.withRegistryEmail(registryMail)
|
|
|
@@ -47,9 +48,9 @@ public class DockerImpl implements Docker {
|
|
|
|
|
|
public DockerImpl(String username, String password) {
|
|
|
DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
|
|
|
- .withDockerHost("unix:///var/run/docker.sock")
|
|
|
+ .withDockerHost("unix://" + unixSock)
|
|
|
.withDockerTlsVerify(false)
|
|
|
- .withDockerCertPath(String.format("%s/.docker", System.getProperty("user.home")))
|
|
|
+ //.withDockerCertPath(String.format("%s/.docker", System.getProperty("user.home")))
|
|
|
.withRegistryUsername("username")
|
|
|
.withRegistryPassword("password")
|
|
|
//.withRegistryEmail(registryMail)
|