hawkeyesec / scanner-cli

A project security/vulnerability/risk scanning tool
Other
358 stars 89 forks source link

Docker image not compatible with Jenkins #136

Open raquelguimaraes opened 5 years ago

raquelguimaraes commented 5 years ago

Docker image not compatible with Jenkins

Description

When trying to run the image as a jenkins build envirornment I get the following result:

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).

Steps to Reproduce

Jenkins pipeline declared as:

pipeline {
  agent none

  stages {
    stage('Hawkeye') {
      agent { 
        docker {
          image 'hawkeyesec/scanner-cli:latest'
        }
      }
      steps {
        sh 'hawkeye scan'
      }
    }
  }
}

Version

latest image

Additional Information

Possible Solution

The link on the error message (and some comments on the tickets linked above) suggests using a script as entrypoint so that non arguments can be run as is.