james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject svn commit: r1686810 - in /james/mpt/trunk/impl/imap-mailbox/cyrus: pom.xml src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
Date Mon, 22 Jun 2015 08:20:51 GMT
Author: btellier
Date: Mon Jun 22 08:20:51 2015
New Revision: 1686810

URL: http://svn.apache.org/r1686810
Log:
MPT-16 Support Boot2Docker - contributed by Matthieu Baechlor

Modified:
    james/mpt/trunk/impl/imap-mailbox/cyrus/pom.xml
    james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java

Modified: james/mpt/trunk/impl/imap-mailbox/cyrus/pom.xml
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cyrus/pom.xml?rev=1686810&r1=1686809&r2=1686810&view=diff
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/cyrus/pom.xml (original)
+++ james/mpt/trunk/impl/imap-mailbox/cyrus/pom.xml Mon Jun 22 08:20:51 2015
@@ -37,7 +37,7 @@
         <dependency>
             <groupId>com.spotify</groupId>
             <artifactId>docker-client</artifactId>
-            <version>2.7.6</version>
+            <version>2.7.25</version>
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>

Modified: james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java?rev=1686810&r1=1686809&r2=1686810&view=diff
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
(original)
+++ james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
Mon Jun 22 08:20:51 2015
@@ -39,22 +39,17 @@ public class Docker {
     private final DefaultDockerClient dockerClient;
     private final ContainerConfig containerConfig;
 
-    public Docker(String imageName) {
+    public Docker(String imageName)  {
         containerConfig = ContainerConfig.builder()
                 .image(imageName)
                 .networkDisabled(false)
                 .exposedPorts(ImmutableSet.of(EXPOSED_IMAP_PORT))
                 .build();
         
-        dockerClient = new DefaultDockerClient(DefaultDockerClient.DEFAULT_UNIX_ENDPOINT);
-        
         try {
+            dockerClient = DefaultDockerClient.fromEnv().build();
             dockerClient.pull(imageName);
-        } catch (DockerException e) {
-            throw Throwables.propagate(e);
-        } catch (InterruptedException e) {
-            throw Throwables.propagate(e);
-        } catch (Throwable e) {
+        } catch (Exception e) {
             throw Throwables.propagate(e);
         }
     }
@@ -77,7 +72,7 @@ public class Docker {
     }
     
     public String getHost(ContainerCreation container) {
-        return "localhost";
+        return dockerClient.getHost();
     }
 
     public int getIMAPPort(ContainerCreation container) {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message