Package com.kpelykh.docker.client

Examples of com.kpelykh.docker.client.DockerClient


  @Override
  public final void execute() throws MojoExecutionException, MojoFailureException {
    MavenLogAppender.setLog(getLog());

    try {
      final DockerClient docker = new DockerClient(host.toString());
      getLog().info("Docker version " + docker.version().getVersion());
      doExecute(new DockerOrchestrator(docker, src(), workDir(), prefix, null));
    } catch (Exception e) {
      throw new MojoExecutionException(e.getMessage(), e);
    }
  }
View Full Code Here


        this(docker, new Repo(docker, prefix, src), workDir, new FileOrchestrator(filter, properties), credentials);
    }

  private static DockerClient defaultDockerClient() {
        try {
            return new DockerClient();
        } catch (DockerException e) {
            throw new OrchestrationException(e);
        }
    }
View Full Code Here

    this(docker, new Repo(docker, prefix, src), new FileOrchestrator(workDir, rootDir, filter, properties), credentials, buildFlags);
  }

  private static DockerClient defaultDockerClient() {
        try {
            return new DockerClient();
        } catch (DockerException e) {
            throw new OrchestrationException(e);
        }
    }
View Full Code Here

        final Properties properties = properties();

        getLog().info("properties filtering supported for " + properties.keySet());

        try {
            final DockerClient docker = dockerClient();
            getLog().info("Docker version " + docker.version().getVersion());
            doExecute(new DockerOrchestrator(docker, src(), workDir(), projDir(), prefix, credentials(),
                    TextFileFilter.INSTANCE, properties, buildFlags()));
        } catch (Exception e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }
View Full Code Here

    return buildFlags;
  }

  private DockerClient dockerClient() throws DockerException {
        return version != null
                ? new DockerClient(host.toString(), version)
                : new DockerClient(host.toString());
    }
View Full Code Here

  public void beforeTest() throws DockerException {
    LOG.info("======================= BEFORETEST =======================");
    String url = System.getProperty("docker.url", "http://localhost:4243");
    LOG.info("Connecting to Docker server at " + url);
    dockerClient = new DockerClient(url);

    LOG.info("Pulling image 'busybox'");
    // need to block until image is pulled completely
    logResponseStream(dockerClient.pull("busybox"));
   
View Full Code Here

    this(docker, new Repo(docker, prefix, src), new FileOrchestrator(workDir, rootDir, filter, properties), credentials, buildFlags);
  }

  private static DockerClient defaultDockerClient() {
        try {
            return new DockerClient();
        } catch (DockerException e) {
            throw new OrchestrationException(e);
        }
    }
View Full Code Here

    final Properties properties = properties();

    getLog().info("properties filtering supported for " + properties.keySet());

    try {
      final DockerClient docker = dockerClient();
      getLog().info("Docker version " + docker.version().getVersion());
      doExecute(new DockerOrchestrator(docker, src(), workDir(), prefix, credentials(),
          TextFileFilter.INSTANCE, properties));
    } catch (Exception e) {
      throw new MojoExecutionException(e.getMessage(), e);
    }
View Full Code Here

    }
  }

  private DockerClient dockerClient() throws DockerException {
    return version != null
        ? new DockerClient(host.toString(), version)
        : new DockerClient(host.toString());
  }
View Full Code Here

    this(docker, new Repo(docker, prefix, src), new FileOrchestrator(workDir, rootDir, filter, properties), credentials, buildFlags);
  }

  private static DockerClient defaultDockerClient() {
        try {
            return new DockerClient();
        } catch (DockerException e) {
            throw new OrchestrationException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.kpelykh.docker.client.DockerClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.