I have a utility program that depends on terminal characteristics. I want to execute it inside a docker container. (the program is not a interactive program as such. It is an old program that was written that way).
docker run -i -t
or docker exec -i -t
should open a tty into container. But here is what happens..
user@1755e1f3f735:~/region/primer/cobol_v> kickstop
[Error] Unable to run without terminal device (tty)
user@1755e1f3f735:~/region/primer/cobol_v> tty
not a tty
When -t option to docker command (run/exec) should give a 'tty', the tty commands returns with 'not a tty'. This is puzzling.
I experienced this on a openSuse and fedora23 hosts and images, if that matters. I used 'guake', MATE (Gnome?) terminal emulators for this, with same results.
Is there any solution to this? or this is by design and have to replace/rewrite my utility?
I ran into the same issue, and found "docker exec -ti container script /dev/null" solved the problem.
After login to the container with the above command, I can use screen normally.
Reference: https://github.com/docker/docker/issues/8755
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With