I'm still running into this same issue, whilst trying to run a pyinstaller docker image.
The Sh command gives me the following:
```
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=''`.
[Pipeline]
{
[Pipeline] sh
process apparently never started in /var/jenkins_home/workspace/simple-python-pyinstaller-app@tmp/durable-87eb5f90
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
[Pipeline] }
$ docker stop --time=1 0d2e194b04bb5a12016da7f4dd92019127837debf082d18ba9fdf4cbbf6abbd7
$ docker rm -f 0d2e194b04bb5a12016da7f4dd92019127837debf082d18ba9fdf4cbbf6abbd7
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
```
Running latest jenkins/blueocean image and I'm currently using the following set up for my Jenkinsfile.
```
options
{|
|skipStagesAfterUnstable()|
|} |
docker
{|
|image 'python:2-alpine'|
|} |
steps
{|
|sh 'python -m py_compile sources/add2vals.py sources/calc.py'|
|} |
docker
{|
|image 'qnib/pytest'|
|} |
steps
{|
|sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'|
|} |
always
{|
|junit 'test-reports/results.xml'|
|} |
docker
{|
|image 'cdrx/pyinstaller-linux:python2'|
|args 'docker run -v "/var/jenkins_home/workspace/simple-python-pyinstaller-app/sources:/src/" --name pyinstaller --entrypoint= cdrx/pyinstaller-linux:python2'|
|} |
steps
{|
|sh 'pyinstaller --onefile sources/add2vals.py'|
|} |
success
{|
|archiveArtifacts 'dist/add2vals'|
|} |
}
```
I confirm it affects me as well:
Jenkins ver. 2.190.1, docker, kubernetes and other plugins: latest stable version.
Jenkins runs on linux (inside a docker container)