I try to run the following in a jenkins shell build step job:
script --return -qc ‘sudo docker run -it 2fca032f7fdd’ /dev/null
I use ‘script’ here otherwise I get “no tty” error.
the image was built by this dockerfile:
for i in 1 2 3 4 5; do
echo "sleeping for 15 sec"
Jenkins is running the container as expected but returns immediately as opposed to wait till the container exits by itself.
I would appreciate any help, basically I want to be able to run this container from jenkins and to report the correct exit code.