Living in a DevOps World.

Dennis Otugo Limited

Fix: the input device is not a TTY – Docker

in

Whenever I try to execute a command inside the Docker container with Jenkins, the following error appears:

the input device is not a TTY

Solution:

Instead of using the following in your Jenkinsfile or Jenkins Pipeline Library:

docker exec -it

Use the following instead:

docker exec --tty

The --tty tells docker to configure the tty, which won’t work if you don’t have a tty and try to attach to the container ( that is the default behaviour when you don’t detach -d the container ).


Do you have any question, suggestion, or a correction? Do let me know at [email protected]



Follow

Instagram / LinkedIn