DockerClientJavaApi implements DockerClient { @Override public void defaultRunCommand(String eclipseProjectName, String dockerBuildContext) { ExposedPort tcp8080 = ExposedPort.tcp(8080); CreateContainerResponse container = dockerClient.createContainerCmd("mariolet/my-tomcat") .withCmd("true") .withExposedPorts(tcp8080) .exec(); Ports portBindings = new Ports(); portBindings.bind(tcp8080, Ports.Binding(80)); dockerClient.startContainerCmd(container.getId()) .withPortBindings(portBindings) .exec(); } 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 testDefaultRunCommand() { String buildContextPath = "src/test/resources/simplestDockerBuildContext"; client.defaultRunCommand(null, buildContextPath); }