本文整理了Java中com.palantir.docker.compose.DockerComposeRule.dockerCompose()
方法的一些代码示例,展示了DockerComposeRule.dockerCompose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DockerComposeRule.dockerCompose()
方法的具体详情如下:
包路径:com.palantir.docker.compose.DockerComposeRule
类名称:DockerComposeRule
方法名:dockerCompose
暂无
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
@Override
public void shutdown(DockerComposeRule rule) throws IOException, InterruptedException {
log.debug("Killing docker-compose cluster");
rule.dockerCompose().down();
rule.dockerCompose().kill();
rule.dockerCompose().rm();
}
代码示例来源:origin: palantir/docker-compose-rule
public String run(DockerComposeRunOption options, String containerName,
DockerComposeRunArgument arguments) throws IOException, InterruptedException {
return dockerCompose().run(options, containerName, arguments);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
public String exec(DockerComposeExecOption options, String containerName,
DockerComposeExecArgument arguments) throws IOException, InterruptedException {
return dockerCompose().exec(options, containerName, arguments);
}
代码示例来源:origin: palantir/docker-compose-rule
public String exec(DockerComposeExecOption options, String containerName,
DockerComposeExecArgument arguments) throws IOException, InterruptedException {
return dockerCompose().exec(options, containerName, arguments);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-junit4
public String exec(DockerComposeExecOption options, String containerName,
DockerComposeExecArgument arguments) throws IOException, InterruptedException {
return dockerCompose().exec(options, containerName, arguments);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
public String run(DockerComposeRunOption options, String containerName,
DockerComposeRunArgument arguments) throws IOException, InterruptedException {
return dockerCompose().run(options, containerName, arguments);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
private void removeNetworks(DockerComposeRule rule) throws IOException, InterruptedException {
rule.dockerCompose().down();
}
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-junit4
public String run(DockerComposeRunOption options, String containerName,
DockerComposeRunArgument arguments) throws IOException, InterruptedException {
return dockerCompose().run(options, containerName, arguments);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
@Override
public void shutdown(DockerComposeRule rule) throws IOException, InterruptedException {
List<ContainerName> runningContainers = rule.dockerCompose().ps();
log.info("Shutting down {}", runningContainers.stream().map(ContainerName::semanticName).collect(toList()));
removeContainersCatchingErrors(rule, runningContainers);
removeNetworks(rule);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
@Override
public void shutdown(DockerComposeRule rule) throws IOException, InterruptedException {
List<ContainerName> runningContainers = rule.dockerCompose().ps();
log.info("Shutting down {}", runningContainers.stream().map(ContainerName::semanticName).collect(toList()));
if (removeContainersCatchingErrors(rule, runningContainers)) {
return;
}
log.debug("First shutdown attempted failed due to btrfs volume error... retrying");
if (removeContainersCatchingErrors(rule, runningContainers)) {
return;
}
log.warn("Couldn't shut down containers due to btrfs volume error, "
+ "see https://circleci.com/docs/docker-btrfs-error/ for more info.");
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-junit4
@Override
public void before() throws IOException, InterruptedException {
log.debug("Starting docker-compose cluster");
dockerCompose().build();
DockerCompose upDockerCompose = dockerCompose();
if (removeConflictingContainersOnStartup()) {
upDockerCompose = new ConflictingContainerRemovingDockerCompose(upDockerCompose, docker());
}
upDockerCompose.up();
logCollector().startCollecting(dockerCompose());
log.debug("Waiting for services");
clusterWaits().forEach(clusterWait -> clusterWait.waitUntilReady(containers()));
log.debug("docker-compose cluster started");
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
@Override
public void before() throws IOException, InterruptedException {
log.debug("Starting docker-compose cluster");
dockerCompose().build();
DockerCompose upDockerCompose = dockerCompose();
if (removeConflictingContainersOnStartup()) {
upDockerCompose = new ConflictingContainerRemovingDockerCompose(upDockerCompose, docker());
}
upDockerCompose.up();
logCollector().startCollecting(dockerCompose());
log.debug("Waiting for services");
clusterWaits().forEach(clusterWait -> clusterWait.waitUntilReady(containers()));
log.debug("docker-compose cluster started");
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-junit4
@Override
public void after() {
try {
shutdownStrategy().shutdown(this.dockerCompose(), this.docker());
logCollector().stopCollecting();
} catch (IOException | InterruptedException e) {
throw new RuntimeException("Error cleaning up docker compose cluster", e);
}
}
代码示例来源:origin: palantir/docker-compose-rule
@Override
public void before() throws IOException, InterruptedException {
log.debug("Starting docker-compose cluster");
if (pullOnStartup()) {
dockerCompose().pull();
}
dockerCompose().build();
DockerCompose upDockerCompose = dockerCompose();
if (removeConflictingContainersOnStartup()) {
upDockerCompose = new ConflictingContainerRemovingDockerCompose(upDockerCompose, docker());
}
upDockerCompose.up();
logCollector().startCollecting(dockerCompose());
log.debug("Waiting for services");
new ClusterWait(ClusterHealthCheck.nativeHealthChecks(), nativeServiceHealthCheckTimeout())
.waitUntilReady(containers());
clusterWaits().forEach(clusterWait -> clusterWait.waitUntilReady(containers()));
log.debug("docker-compose cluster started");
}
代码示例来源:origin: palantir/docker-compose-rule
@Override
public void after() {
try {
shutdownStrategy().shutdown(this.dockerCompose(), this.docker());
logCollector().stopCollecting();
} catch (IOException | InterruptedException e) {
throw new RuntimeException("Error cleaning up docker compose cluster", e);
}
}
代码示例来源:origin: palantir/docker-compose-rule
@Test
public void shut_down_multiple_containers_immediately() throws Exception {
assertThat(rule.dockerCompose().ps(), is(TestContainerNames.of()));
rule.before();
assertThat(rule.dockerCompose().ps().size(), is(2));
rule.after();
assertThat(rule.dockerCompose().ps(), is(TestContainerNames.of()));
}
代码示例来源:origin: palantir/docker-compose-rule
@Test
public void shut_down_multiple_containers_immediately() throws Exception {
DockerComposeRule rule = DockerComposeRule.builder()
.file("src/test/resources/shutdown-strategy.yaml")
.logCollector(new DoNothingLogCollector())
.retryAttempts(0)
.shutdownStrategy(ShutdownStrategy.AGGRESSIVE)
.build();
assertThat(rule.dockerCompose().ps(), is(TestContainerNames.of()));
rule.before();
assertThat(rule.dockerCompose().ps().size(), is(2));
rule.after();
assertThat(rule.dockerCompose().ps(), is(TestContainerNames.of()));
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-junit4
@Value.Default
public Cluster containers() {
return ImmutableCluster.builder()
.ip(machine().getIp())
.containerCache(new ContainerCache(dockerCompose()))
.build();
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
@Value.Default
public Cluster containers() {
return ImmutableCluster.builder()
.ip(machine().getIp())
.containerCache(new ContainerCache(dockerCompose()))
.build();
}
代码示例来源:origin: palantir/docker-compose-rule
@Value.Default
public Cluster containers() {
return ImmutableCluster.builder()
.ip(machine().getIp())
.containerCache(new ContainerCache(docker(), dockerCompose()))
.build();
}
内容来源于网络,如有侵权,请联系作者删除!