Hi I am trying to run a command with docker-java api on docker version 1.24 and I get the below error
com.github.dockerjava.api.exception.BadRequestException: {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
the api call I am doing is
DockerClient docker = createClient();
docker.startContainerCmd(container).exec();
private DockerClient createClient() {
DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder()
.build();
DockerClient docker = DockerClientBuilder.getInstance(config)
.withDockerCmdExecFactory(this.commandExecFactory).build();
return docker;
}
can anyone help me in this