jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-67443] docker is failed to stop & rm container that was already stopped and exit with error

Open
#681 0 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

When I'm using the inside method to run my unit test inside my docker and when the test is failed the container will be exit with error and will be removed, but the docker plugin will try to stop & rm container which is not exist any more.

 


Reproduction steps

 

docker.image(img_name).inside(-u root:root --entrypoint=){

  sh "exit 1"
}

 


Results

Expected result:

The docker stop and rm should exit with 0 by checking if container exist, if yes kill it, if not skip

Actual result:

docker stop and rm exit with exit error 1

---
Originally reported by dordor, imported from: docker is failed to stop & rm container that was already stopped and exit with error


  • status: Open
  • priority: Minor
  • component(s): docker-workflow-plugin
  • label(s): docker-build-step, docker-workflow-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

When I'm using the inside method to run my unit test inside my docker and when the test is failed the container will be exit with error and will be removed, but the docker plugin will try to stop & rm container which is not exist any more.

 


Reproduction steps

 



docker.image(img_name).inside(-u root:root --entrypoint=){

  sh "exit 1"
}


 


Results

Expected result:

The docker stop and rm should exit with 0 by checking if container exist, if yes kill it, if not skip

Actual result:

docker stop and rm exit with exit error 1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.