Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67443

docker is failed to stop & rm container that was already stopped and exit with error

      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

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

          dor s created issue -
          dor s made changes -
          Description Original: 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.

           

          !https://user-images.githubusercontent.com/22152786/147243836-a6bce2d2-faa4-4f62-b046-eb4d6ca89625.png!
          h3. Reproduction steps

          docker.image(img_name).inside(-u root:root --entrypoint=){
          sh "exit 1"
          }
          h3. 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
          New: 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.

           

          !https://user-images.githubusercontent.com/22152786/147243836-a6bce2d2-faa4-4f62-b046-eb4d6ca89625.png!
          h3. Reproduction steps

           
          {code:java}
          docker.image(img_name).inside(-u root:root --entrypoint=){
            sh "exit 1"
          }
          {code}
           
          h3. 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

            Unassigned Unassigned
            dordor dor s
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: