public synchronized void removeContainer(String containerId) throws DockerException, InterruptedException { log.trace("Removing container {}", containerId); int stopTimeoutSec = getConfig().getDockerStopTimeoutSec(); if (stopTimeoutSec == 0) { dockerClient.removeContainer(containerId, forceKill()); } else { dockerClient.removeContainer(containerId); } }
/** * Kill then remove the container. If not specified, defaults to false. * * @return RemoveContainerParam */ public static RemoveContainerParam forceKill() { return forceKill(true); }
/** * Kill then remove the container. If not specified, defaults to false. * * @return RemoveContainerParam */ public static RemoveContainerParam forceKill() { return forceKill(true); }