5
votes

I have a bash script that's running in jenkins which starts a docker container and runs a simple command (PWD), but the output from that command is not written to the build console. Any ideas what I am misconfiguring? I've tried various docker arguments but nothing seems to work. It seems to really be a problem only when executing docker run or docker exec commands. docker rm commands print output to the jenkins console.

example:

+ docker run my-image /bin/bash -c pwd

Note: the jenkins build is also executed in a docker container

1
The command above is written in Jenkinsfile or where? - user12640668
The command is executed in a jenkins shell script (bash) - Grant Phillips
Did you get anything working on this? - Khan

1 Answers

-1
votes

Try using parameter "-t". Just a guess, but if I'm not mistaken this is how you do it.