| With test pipeline:
pipeline {
stages {
stage('test tty') {
agent { docker { image 'alpine'; alwaysPull true; reuseNode true } }
steps {
sh "tty"
}
}
}
}
I can see in logs:
docker run -t -d [ ... other options ... ] cat
so the container is started with tty but output from `sh` command is:
It looks like shell command is executed with `docker exec somename somecommand` instead of `docker exec -t somename somecommand` Is there a way to start `sh` step with tty enabled? Note: in case of some commands it is important to run with `tty`, for example https://mustache.github.io/mustache.1.html `mustache --error params template` will fail with error. |