I’m not sure, what’s going on here, but I might be able to give you some pointers:
Try running it without the ‘script’ part. Instead omit the -it options. You don’t need -i, since you’re not typing into the container and you don’t need -t because Jenkins will print the container output anyway…
Maybe ‘sudo’ is the problem?! If Jenkins can’t run docker commands without using sudo, you’ll need to add Jenkins to the docker group. (You might need to create the group. Don’t forget to re-login/reboot after…)
@hejado Thanks for your replay, I resorted to a different flow, where I run the container with -d (and a command that keeps it running), then I’ll use ‘exec’ to run other commands.