i'm using the java-docker client from here: https://github.com/docker-java/docker-java. I trying to figure out how to set the stop timeout for the docker stop command.
So i'm using in java the method dockerClient.stopContainerCmd(containerId)).exec(); but there is no option for the stop timeout, like the docker cli provides. Maybe someone has already solved the problem or has an idea ? :-)
dockerClient.stopContainerCmd()returns aStopContainerCmdobject, and that has a.withTimeout()method. You should be able to add this into your call chain: