use of com.spotify.docker.client.DockerException in project kie-wb-common by kiegroup.
the class DockerRuntimeManager method restart.
@Override
public void restart(RuntimeId runtimeId) throws RuntimeOperationException {
DockerRuntime runtime = (DockerRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
try {
docker.getDockerClient(runtime.getProviderId()).restartContainer(runtime.getId());
refresh(runtimeId);
} catch (DockerException | InterruptedException ex) {
LOG.error("Error Restarting container: " + runtimeId.getId(), ex);
throw new RuntimeOperationException("Error Restarting container: " + runtimeId.getId(), ex);
}
}
use of com.spotify.docker.client.DockerException in project kie-wb-common by kiegroup.
the class DockerRuntimeManager method start.
@Override
public void start(RuntimeId runtimeId) throws RuntimeOperationException {
DockerRuntime runtime = (DockerRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
try {
LOG.info("Starting container: " + runtimeId.getId());
docker.getDockerClient(runtime.getProviderId()).startContainer(runtime.getId());
refresh(runtimeId);
} catch (DockerException | InterruptedException ex) {
LOG.error("Error Starting container: " + runtimeId.getId(), ex);
throw new RuntimeOperationException("Error Starting container: " + runtimeId.getId(), ex);
}
}
Aggregations