use of io.elastest.epm.client.DockerContainer in project elastest-torm by elastest.
the class PcapService method startPcap.
public Boolean startPcap(String execId) {
String containerName = containerPrefix + execId;
if (!containersList.containsKey(containerName)) {
DockerBuilder dockerBuilder = DockerContainer.dockerBuilder(dockpcapImage, containerName).network(dockpcapNetworkPrefix + execId);
DockerContainer dockerContainer = dockerBuilder.build();
containersList.put(containerName, dockerContainer);
try {
dockerService.startAndWaitContainer(dockerContainer);
return true;
} catch (InterruptedException e) {
log.error("Pcap not started {}", execId, e);
}
}
return false;
}
Aggregations