-
Bug
-
Resolution: Fixed
-
Trivial
-
None
When docker can't remove image build fails. (Docker version 17.03.1-ce, build c6d412e)
Problem exists on docker side, more detailed problem description https://github.com/moby/moby/issues/27381#issuecomment-267547259
Possible workaround for this: ignore docker remove container error or add option into UI.
Stopping Docker container after build completion
$ docker kill 0eb3f75742385b7c8606d9ffec2b050fc12fabe86cfcf70375e655658fe33938
0eb3f75742385b7c8606d9ffec2b050fc12fabe86cfcf70375e655658fe33938
$ docker rm --force 0eb3f75742385b7c8606d9ffec2b050fc12fabe86cfcf70375e655658fe33938
Error response from daemon: Driver overlay failed to remove root filesystem 0eb3f75742385b7c8606d9ffec2b050fc12fabe86cfcf70375e655658fe33938: remove /var/lib/docker/overlay/89babed731fd919aebbb37d0afee49a8a1b88443e3f5e7912396adca222949e3/merged: device or resource busy
FATAL: Failed to remove docker container 0eb3f75742385b7c8606d9ffec2b050fc12fabe86cfcf70375e655658fe33938
java.lang.RuntimeException: Failed to remove docker container 0eb3f75742385b7c8606d9ffec2b050fc12fabe86cfcf70375e655658fe33938
at com.cloudbees.jenkins.plugins.docker_build_env.Docker.kill(Docker.java:173)
at com.cloudbees.jenkins.plugins.docker_build_env.BuiltInContainer.tearDown(BuiltInContainer.java:70)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper$1.tearDown(DockerBuildWrapper.java:185)
at hudson.model.Build$BuildExecution.doRun(Build.java:174)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
at hudson.model.Run.execute(Run.java:1735)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
Finished: FAILURE