LOGGER.debug("Executing Docker Remove Container Request");
String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class);
RemoveContainerCmd removeContainerCmd = client.removeContainerCmd(containerId);
Boolean force = DockerHelper.getProperty(DockerConstants.DOCKER_FORCE, configuration, message, Boolean.class);
if (force != null && force) {
removeContainerCmd.withForce(force);
}
Boolean removeVolumes = DockerHelper.getProperty(DockerConstants.DOCKER_REMOVE_VOLUMES, configuration, message, Boolean.class);
if (removeVolumes != null && removeVolumes) {
removeContainerCmd.withRemoveVolumes(removeVolumes);
}
return removeContainerCmd;
}