-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"cannot enable tty mode on non tty input" in Cygwin in Windows #12469
Comments
@elrac looks like a bug. I'll take a look soon. Can you please try on cmd.exe/powershell or msysgit (git bash for windows) to unblock yourself? |
I'm actually aware of this. This showed up in my testing before. If we ask Win32 API if the stdout/stderr handles Cygwin passes are terminals or not, it says they're not. mSysgit or ConEmu doesn't do this nor does conhost based consoles (cmd.exe/powershell). |
Figures that it would be a Cygwin issue. I'll probably go back to SSHing into the VM with Putty. Thank you for looking into it. |
@elrac hmm interesting. Why do you really want to |
@ahmetalpbalkan The problem with switching to another shell is that I already have my development environment set up the way I like it. I did try running Cygwin through conemu and I found that the terminal detection issue seems to be due to MinTTY, the terminal program that Cygwin uses. When I run the cygwin shell directly through conemu docker is able enable TTY mode. |
@elrac I see. Let's keep the issue open, we'll probably need to add a hack to fix this behavior of Cygwin. |
I'm having this issue as well... (Windows 7, Cygwin) |
Same on Win 8.1 and cygwin |
👍 Same on Babun + Win 7 |
👍 |
+1 same on win 7 / cygwin |
+1 same problem on windows 8.1 / cygwin |
+1 same issue please fix! |
+ 1 same here |
+1 same same |
I'm still seeing this issue in version 1.7.1 |
+1 here as well... thanks guys! |
Also have this issue |
This is an issue when running 'docker -it' command (interactive terminal) when attempting to debug a Dockerfile. Yes we can use the host OS instead of the cygwin/Babun tty terminal, but most/all of the docs written for docker assume a Linux prompt/terminal. Is there a $TERM setting which will work correctly? |
ping @ahmetalpbalkan do you know if there's any progress here in finding a hack/workaround? |
@thaJeztah Not really, last time I checked, Cygwin was passing stdout/stderr descriptors that look just like actual files (it creates an effect like |
The problem isn't with Cygwin directly, but with the terminal app Mintty. Here is more information about the problem https://code.google.com/p/mintty/issues/detail?id=56 . A workaround would be to run Cygwin in a different command line app. |
This isn't directly related to Cygwin. |
I reproduce the problem with ConEmu with bash/zsh. |
+1 |
+1 on babun |
@edpichler Why not use ssh or the solution I propose ? |
@tdeheurles I just installed all the toolbox, started Docker Quickstarter Terminal and did "docker-machine ssh default". After this, I can run the images bash. Thank you. |
+1 "winpty" is my altenative but I'm waiting for a solution too. |
+1 Windows 7 |
+1 Windows 7 on Babun |
I wrote a simple workaround / quick fix to allow using Docker Toolbox from Babun, it may help some of you: https://github.com/tiangolo/babun-docker With that you can keep using your And if you are using Cygwin, you should use Babun, a very improved version of Cygwin. You just have to run one command to setup everything. Although I encourage you to check the source code before running any script (including mine) in your terminal. Inside, it installs and sets up winpty, and tries to start your default docker-machine VM and set up its environment. Maybe it gets more relevant now since newer versions of Docker Toolbox come with Git 2.5, which uses mintty and has the same problem of "cannot enable tty mode on non tty input" as in Babun. |
hi @tiangolo, thank you, it works fine. |
I'm glad it helped @tdeheurles.
The guide is here: https://github.com/tiangolo/babun-docker/wiki/Docker-Volumes-with-Babun |
I'm not running Windows, but I'm seeing this issue running docker via maven-ant-plugin. I'm posting this here since #16089 was closed
Steps to reproduce
Expected result Observed result
Additional info |
I'm use this command to interactive with my container:
mysqldb = container names |
@stayclassychicago, have same on MacOS using gradle exec: task startDocker(type:Exec){
commandLine "./test-in-docker.sh", uid //fails here: cannot enable tty mode on non tty input
} If I run |
same problem under cygwin under windows 10 64-bit +1 |
The docker quickstart terminal seems to work without any issue for a long Le lun. 28 mars 2016 19:54, Andrew Proper notifications@github.com a
|
thanks @tdeheurles I have a path problem running docker.exe from the docker quickstart terminal but I'll work on fixing that to see if it will work once I have that fixed |
@endosynth If you are using Cygwin you may well try babun-docker. Babun is an improved Cygwin. And babun-docker might be what you need: https://github.com/tiangolo/babun-docker It's just a little program that works on top of Docker in the Babun Terminal (via Winpty), but makes the usage of Docker in Windows a lot simpler and closer to what was intended. Without having to SSH, adding and mounting shared volumes in your Virtual Machine, using Winpty directly and other things. |
I fixed my problem with the quickstart terminal by doing the following, so now it works OK for me:
Note that I also tried installing babun but it wasn't running properly for me so I removed it. I could have tried harder but wanted to try the quickstart terminal again first. thanks! |
@tiangolo thank you very much! btw, it's work with docker beta! |
This works for me: winpty docker run -it name-container-running bash |
I was having the same issue when I tried to run "docker run -it ubuntu bash" from cygwin. so the work around for this (after digging around some resources which I will reference below) so I followed the guide from this website: I decided to re-install the version of my installed cygwin (this is not actually necessary, but I just wanted to start after installing cygwin, I ran: git clone https://github.com/rprichard/winpty.git after that i tested my installtion from the cygein terminal: by entering the command: then i ran the docker exec command but now i have some issues with my cygwin installation ! i get a permission denied message also when I tried to start a 'Dockerized webserver' |
When attempting to run docker in Cygwin(Babun) in Windows if the command uses the -t flag I receive the message:
it seems like it isn't correctly passing the -t option to the underlying ssh call, but I don't know why that would be seeing as the ssh installed with git seems to have the same arguments as the one installed with Babun.
The text was updated successfully, but these errors were encountered: