• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • docker-workflow-plugin
    • None
    • problem occurs on version 1.15 and above of the plugin

      I write a dead simple Dockerfile

      FROM openjdk:8-jdk-alpine
      ENTRYPOINT "java"
      

      I write a dead simple declarative pipeline

      pipeline {
          agent { dockerfile true }
          stages {
              stage('Dead Simple') {
                  steps {
                      checkout scm
                  }
              }
          }
       }

      I get an error.

      I get the same error with 

      pipeline {
          agent { docker { image 'openjdk:8-jdk-alpine' } }
          stages {
              stage('Dead Simple') {
                  steps {
                      checkout scm
                  }
              }
          }
      }

      The error is

      ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
      Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
      

      I cannot pass --entrypoint to the run command, it's jenkins that calls it

      a bit more logs :

      [Pipeline] withDockerContainer
      Jenkins does not seem to be running inside a container
      $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
      $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
      ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
      Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
      

          [JENKINS-51307] Declarative pipeline and docker entrypoint

          Frederic Rousseau created issue -
          Frederic Rousseau made changes -
          Description Original: I write a dead simple Dockerfile

           
          {code:java}
          FROM openjdk:8-jdk-alpine
          ENTRYPOINT "java"
          {code}
           

          I write a dead simple declarative pipeline
          {code:java}
          pipeline {
              agent { dockerfile true }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
           }{code}
          I get an error.

          I get the same error with 
          {code:java}
          pipeline {
              agent { docker 'openjdk:8-jdk-alpine' }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
          }{code}
          The error is
          {code:java}
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          I cannot pass --entrypoint to the run command, it's jenkins that call it

          a bit more logs :
          {code:java}
          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
          $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          New: I write a dead simple Dockerfile

           
          {code:java}
          FROM openjdk:8-jdk-alpine
          ENTRYPOINT "java"
          {code}
           

          I write a dead simple declarative pipeline
          {code:java}
          pipeline {
              agent { dockerfile true }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
           }{code}
          I get an error.

          I get the same error with 
          {code:java}
          pipeline {
              agent { docker 'openjdk:8-jdk-alpine' }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
          }{code}
          The error is
          {code:java}
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          I cannot pass --entrypoint to the run command, it's jenkins that calls it

          a bit more logs :
          {code:java}
          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
          $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          Frederic Rousseau made changes -
          Issue Type Original: New Feature [ 2 ] New: Bug [ 1 ]
          Frederic Rousseau made changes -
          Description Original: I write a dead simple Dockerfile

           
          {code:java}
          FROM openjdk:8-jdk-alpine
          ENTRYPOINT "java"
          {code}
           

          I write a dead simple declarative pipeline
          {code:java}
          pipeline {
              agent { dockerfile true }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
           }{code}
          I get an error.

          I get the same error with 
          {code:java}
          pipeline {
              agent { docker 'openjdk:8-jdk-alpine' }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
          }{code}
          The error is
          {code:java}
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          I cannot pass --entrypoint to the run command, it's jenkins that calls it

          a bit more logs :
          {code:java}
          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
          $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          New: I write a dead simple Dockerfile
          {code:java}
          FROM openjdk:8-jdk-alpine
          ENTRYPOINT "java"
          {code}
          I write a dead simple declarative pipeline
          {code:java}
          pipeline {
              agent { dockerfile true }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
           }{code}
          I get an error.

          I get the same error with 
          {code:java}
          pipeline {
              agent { docker 'openjdk:8-jdk-alpine' }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
          }{code}
          The error is
          {code:java}
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          I cannot pass --entrypoint to the run command, it's jenkins that calls it

          a bit more logs :
          {code:java}
          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
          $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          Frederic Rousseau made changes -
          Description Original: I write a dead simple Dockerfile
          {code:java}
          FROM openjdk:8-jdk-alpine
          ENTRYPOINT "java"
          {code}
          I write a dead simple declarative pipeline
          {code:java}
          pipeline {
              agent { dockerfile true }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
           }{code}
          I get an error.

          I get the same error with 
          {code:java}
          pipeline {
              agent { docker 'openjdk:8-jdk-alpine' }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
          }{code}
          The error is
          {code:java}
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          I cannot pass --entrypoint to the run command, it's jenkins that calls it

          a bit more logs :
          {code:java}
          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
          $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          New: I write a dead simple Dockerfile
          {code:java}
          FROM openjdk:8-jdk-alpine
          ENTRYPOINT "java"
          {code}
          I write a dead simple declarative pipeline
          {code:java}
          pipeline {
              agent { dockerfile true }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
           }{code}
          I get an error.

          I get the same error with 
          {code:java}
          pipeline {
              agent { docker { image 'openjdk:8-jdk-alpine' } }
              stages {
                  stage('Dead Simple') {
                      steps {
                          checkout scm
                      }
                  }
              }
          }{code}
          The error is
          {code:java}
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          I cannot pass --entrypoint to the run command, it's jenkins that calls it

          a bit more logs :
          {code:java}
          [Pipeline] withDockerContainer
          Jenkins does not seem to be running inside a container
          $ docker run -t -d -u 107:111 -w /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA:rw,z -v /var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:/var/lib/jenkins/workspace/oh-pr0009-api_master-IFYDNFODANQT2HMWSAOO6P6UKZZUCWSO2LNM2M6G7DUPGPLNH7HA@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** 4d6ffe9d9713df374dd2670073b9ea32598df407 cat
          $ docker top 13d063e7996ad4476075baf7586aa3186d0bff08cdbd4c10205327bb6b44c75b -eo pid,comm
          ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
          Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
          {code}
          Frederic Rousseau made changes -
          Component/s New: docker-workflow-plugin [ 20625 ]
          Component/s Original: docker-build-step-plugin [ 18721 ]
          Frederic Rousseau made changes -
          Assignee Original: vjuranek [ vjuranek ] New: Jesse Glick [ jglick ]

          Hey Jesse, I saw you were working on this plugin and took the liberty to assign you this issue. When I first opened it, I chose the wrong component. The right one is docker-workflow-plugin. Cheers

          Frederic Rousseau added a comment - Hey Jesse, I saw you were working on this plugin and took the liberty to assign you this issue. When I first opened it, I chose the wrong component. The right one is docker-workflow-plugin. Cheers

          Jesse Glick added a comment -

          As noted in the error message, this is not a valid entrypoint.

          Jesse Glick added a comment - As noted in the error message, this is not a valid entrypoint.
          Jesse Glick made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            csanchez Carlos Sanchez
            zougi Frederic Rousseau
            Votes:
            8 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated: