我在docker 1.12.0上运行,这是一个包含OpenJdk 8,Jenkins 1.609.3和以下jenkins插件的docker镜像:
jclouds-jenkins 2.8.1-1
token-macro 1.12.1
持久任务1.12
docker-plugin 0.16.1
ssh-slaves 1.9
和另一个船坞人形象作为詹金斯奴隶。
当运行应该在我的docker jenkins slave上执行的作业时,我有以下异常
SEVERE: Error in provisioning; template='DockerTemplate{configVersion=2, labelString='testslave', launcher=com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher@5872b83f, remoteFsMapping='/home/jenkins', remoteFs='/home/jenkins', instanceCap=1, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@6f59d98e, numExecutors=1, dockerTemplateBase=DockerTemplateBase{image=jenkins_slave}, removeVolumes=false, pullStrategy=PULL_LATEST}' for cloud='Local Dockerhost'
com.github.dockerjava.api.BadRequestException: {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
at com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.filter(ResponseStatusExceptionFilter.java:43)
at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:134)
at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:123)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:251)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:333)
at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:28)
at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:13)
at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:33)
at com.github.dockerjava.core.command.StartContainerCmdImpl.exec(StartContainerCmdImpl.java:53)
at com.nirima.jenkins.plugins.docker.DockerCloud.runContainer(DockerCloud.java:294)
at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:372)
at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:58)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:248)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:245)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Aug 18, 2016 12:22:32 PM hudson.slaves.NodeProvisioner$2 run
WARNING: Provisioned slave Image of jenkins_slave failed to launch
com.github.dockerjava.api.BadRequestException: {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
at com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.filter(ResponseStatusExceptionFilter.java:43)
at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:134)
at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:123)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:251)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:333)
at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:28)
at com.github.dockerjava.jaxrs.StartContainerCmdExec.execute(StartContainerCmdExec.java:13)
at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:33)
at com.github.dockerjava.core.command.StartContainerCmdImpl.exec(StartContainerCmdImpl.java:53)
at com.nirima.jenkins.plugins.docker.DockerCloud.runContainer(DockerCloud.java:294)
at com.nirima.jenkins.plugins.docker.DockerCloud.provisionWithWait(DockerCloud.java:372)
at com.nirima.jenkins.plugins.docker.DockerCloud.access$000(DockerCloud.java:58)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:248)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:245)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)