我正在尝试使用 jenkins 插件构建 docker 映像docker-build-step
。我只是在尝试创建图像的标准设置:
但是,当我尝试构建时,我得到了 NullPointerException。起初我认为它与这个问题相同,但后来我仔细观察发现它不是(虽然我不太明白那个问题的答案,所以我没有设法明确排除它不是一个相关的问题)
First time build. Skipping changelog.
ERROR: Build step failed with exception
java.lang.NullPointerException
at com.github.dockerjava.jaxrs.DockerCmdExecFactoryImpl.init(DockerCmdExecFactoryImpl.java:105)
at com.github.dockerjava.core.DockerClientImpl.withDockerCmdExecFactory(DockerClientImpl.java:64)
at com.github.dockerjava.core.DockerClientBuilder.build(DockerClientBuilder.java:63)
at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.createDockerClient(DockerBuilder.java:132)
at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.getDockerClient(DockerBuilder.java:204)
at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:68)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Execute Docker command' marked build as failure
Finished: FAILURE
我能做些什么来处理这个异常?