getting starting container with HostConfig was deprecated since v1.10 and removed in v1.12 with version 3.0.0

594 views
Skip to first unread message

Gaurav Rawat

unread,
Jun 27, 2016, 9:59:44 PM6/27/16
to docker-java-dev
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 

marcuslinke

unread,
Jun 28, 2016, 7:11:13 AM6/28/16
to docker-java-dev
Hi,

which version of docker-java do you use?

Regards

Gaurav Rawat

unread,
Jun 28, 2016, 9:04:00 AM6/28/16
to docker-java-dev
3.0.0

 <dependency>
 
<groupId>com.github.docker-java</groupId>
 
<artifactId>docker-java</artifactId>
 
<version>3.0.0</version>
 
<scope>test</scope>
 
</dependency>

Kanstantsin Shautsou

unread,
Jun 28, 2016, 2:24:11 PM6/28/16
to docker-java-dev
Reply all
Reply to author
Forward
0 new messages