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).
The suggested approach of using docker run requires mounting the current volume (-v $PWD:/target). Due to particulars of the Jenkins setup, the volume mounting doesn't work.
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.
Docker image not compatible with Jenkins
Description
When trying to run the image as a jenkins build envirornment I get the following result:
Steps to Reproduce
Jenkins pipeline declared as:
Version
latest
imageAdditional Information
The suggested approach of using
docker run
requires mounting the current volume (-v $PWD:/target
). Due to particulars of the Jenkins setup, the volume mounting doesn't work.JENKINS-33149: Images that specify an entrypoint can not be used as a build environment
JENKINS-51307: Declarative pipeline and docker entrypoint
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.