-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
I'm trying to run command inside a container using Jenkins pipelines. This is what my pipeline scripts looks like.
podTemplate(cloud: 'openshift', label: 'mypod', containers: [ containerTemplate( name: 'test-image', image: '172.30.1.1:5000/foo/test', ttyEnabled: true, command: 'cat', envVars: [ containerEnvVar(key: 'SERVICE_USER', value: 'asanami'), ] ) ]) { node('mypod') { stage('project') { container('pbuild') { stage('Build a project') { sh """ echo helloworld """ } } } } }
However, it looks like the entrypoint script defined in the docker image is getting ignore or overriden. I need to specify the command 'cat' to prevent the container from exiting straight away. Is it possible to respect the entrypoint as well though?