DockerClientJavaApi implements DockerClient { @Override public void defaultBuildCommand(String eclipseProjectName, String dockerBuildContext) { File baseDir = new File(dockerBuildContext); InputStream response = dockerClient.buildImageCmd(baseDir).exec(); StringWriter logwriter = new StringWriter(); messageConsole.getDockerConsoleOut().println(">>> Building " + dockerBuildContext + "/Dockerfile with default options"); messageConsole.getDockerConsoleOut().println(""); try { messageConsole.getDockerConsoleOut().flush(); LineIterator itr = IOUtils.lineIterator(response, "UTF-8"); while (itr.hasNext()) { String line = itr.next(); logwriter.write(line); messageConsole.getDockerConsoleOut().println(line); messageConsole.getDockerConsoleOut().flush(); } } catch (IOException e) { e.printStackTrace(); } finally { IOUtils.closeQuietly(response); } messageConsole.getDockerConsoleOut().println(""); messageConsole.getDockerConsoleOut().println("<<< Build ended"); } DockerClientJavaApi(); @Override void infoCommand(); @Override void defaultBuildCommand(String eclipseProjectName, String dockerBuildContext); @Override void defaultRunCommand(String eclipseProjectName, String dockerBuildContext); @Override void defaultRmCommand(String eclipseProjectName, String dockerBuildContext); @Override void defaultPsCommand(); @Override void defaultLogsCommand(String eclipseProjectName, String dockerBuildContext);  }
@Test public void testDefaultBuildCommand() { String buildContextPath = "src/test/resources/simplestDockerBuildContext"; client.defaultBuildCommand(null, buildContextPath); }