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" when trying to run -it ubuntu bash 1.8.1c. #136

Closed
avelinos opened this Issue Sep 1, 2015 · 50 comments

Comments

Projects
None yet
@avelinos

avelinos commented Sep 1, 2015

With DockerToolbox 1.8.1c for Windows, I get "cannot enable tty mode on non tty input" when trying to run

docker run -it ubuntu bash

I'm seeing this behavior with both Windows 7 Pro and 10 Pro.

This also happens to affect a number of my other containers for a work project, but I don't always see the "tty" error until trying to attach to a container. All of the containers worked fine under 1.8.1b

This is with a fresh install and an upgrade from 1.8.1b. If I uninstall 1.8.1c and reinstall 1.8.1b, then I can run the above command and my work containers just fine.

I've noticed that 1.8.1b uses MINGW32 and 1.8.1c uses MINGW64. It looks like MINGW64 is part of the Git 2.5 upgrade. I can't run Git 2.5 with 1.8.1b so I can't verify whether or not that is related to the bug.

@withinboredom

This comment has been minimized.

Show comment
Hide comment
@withinboredom

withinboredom commented Sep 3, 2015

+1

@Negashev

This comment has been minimized.

Show comment
Hide comment
@Negashev

Negashev Sep 3, 2015

+1, try
winpty docker run -it

Negashev commented Sep 3, 2015

+1, try
winpty docker run -it

@mchiang0610 mchiang0610 added the bug label Sep 9, 2015

@mchiang0610

This comment has been minimized.

Show comment
Hide comment
@mchiang0610

mchiang0610 Sep 9, 2015

Contributor

Thanks! We'll dive deeper into the problem.

cc/ @jeffdm

Contributor

mchiang0610 commented Sep 9, 2015

Thanks! We'll dive deeper into the problem.

cc/ @jeffdm

@mchiang0610 mchiang0610 added the windows label Sep 9, 2015

@AustinMaddox

This comment has been minimized.

Show comment
Hide comment
@AustinMaddox

AustinMaddox Sep 14, 2015

+1

Ever since installing the latest version of the Docker Toolbox (v1.8.2)

When I run...

docker run -it ubuntu bash

I am given this message...

cannot enable tty mode on non tty input

I'm running 64-bit Windows 7, Git 2.5.2 (MINGW64).

$ docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:10:10 UTC 2015
 OS/Arch:      windows/amd64

Server:
 Version:      1.8.1
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   d12ea79
 Built:        Thu Aug 13 02:49:29 UTC 2015
 OS/Arch:      linux/amd64

AustinMaddox commented Sep 14, 2015

+1

Ever since installing the latest version of the Docker Toolbox (v1.8.2)

When I run...

docker run -it ubuntu bash

I am given this message...

cannot enable tty mode on non tty input

I'm running 64-bit Windows 7, Git 2.5.2 (MINGW64).

$ docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:10:10 UTC 2015
 OS/Arch:      windows/amd64

Server:
 Version:      1.8.1
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   d12ea79
 Built:        Thu Aug 13 02:49:29 UTC 2015
 OS/Arch:      linux/amd64
@cagdascirit

This comment has been minimized.

Show comment
Hide comment
@cagdascirit

cagdascirit Sep 15, 2015

+1 same with @austin881

cagdascirit commented Sep 15, 2015

+1 same with @austin881

@jwsongkr

This comment has been minimized.

Show comment
Hide comment
@jwsongkr

jwsongkr commented Sep 15, 2015

+1 same.

@jpt007

This comment has been minimized.

Show comment
Hide comment
@jpt007

jpt007 commented Sep 16, 2015

+1

@keatz55

This comment has been minimized.

Show comment
Hide comment
@keatz55

keatz55 commented Sep 16, 2015

+1

@laofenggithub

This comment has been minimized.

Show comment
Hide comment
@laofenggithub

laofenggithub commented Sep 17, 2015

+1

@loboolsson

This comment has been minimized.

Show comment
Hide comment
@loboolsson

loboolsson Sep 17, 2015

+1 Windows 10

loboolsson commented Sep 17, 2015

+1 Windows 10

@Callero

This comment has been minimized.

Show comment
Hide comment
@Callero

Callero Sep 17, 2015

+1 Windows 7

Callero commented Sep 17, 2015

+1 Windows 7

@adaminspace

This comment has been minimized.

Show comment
Hide comment
@adaminspace

adaminspace Sep 18, 2015

+1 Windows 10

adaminspace commented Sep 18, 2015

+1 Windows 10

@kvickyk

This comment has been minimized.

Show comment
Hide comment
@kvickyk

kvickyk Sep 18, 2015

+1 Windows 8.1

kvickyk commented Sep 18, 2015

+1 Windows 8.1

@zhaohc10

This comment has been minimized.

Show comment
Hide comment
@zhaohc10

zhaohc10 Sep 22, 2015

+1 windows 7

zhaohc10 commented Sep 22, 2015

+1 windows 7

@redutan

This comment has been minimized.

Show comment
Hide comment
@redutan

redutan Sep 22, 2015

In my case Solution
winpty docker run -it ubuntu

redutan commented Sep 22, 2015

In my case Solution
winpty docker run -it ubuntu

@zhaohc10

This comment has been minimized.

Show comment
Hide comment
@zhaohc10

zhaohc10 Sep 23, 2015

thanks but it did not work.I did this way first and it works now: docker-machine ssh default Thanks

Best regards,

Andrew Zhao (510) 375-9935 “When you are right
you cannot be too radical; when you are wrong, you cannot be too
conservative.”

Date: Mon, 21 Sep 2015 18:51:42 -0700
From: notifications@github.com
To: toolbox@noreply.github.com
CC: zhaohc10@hotmail.com
Subject: Re: [toolbox] "cannot enable tty mode on non tty input" when trying to run -it ubuntu bash 1.8.1c. (#136)

docker run -it ubuntu bash


Reply to this email directly or view it on GitHub.

zhaohc10 commented Sep 23, 2015

thanks but it did not work.I did this way first and it works now: docker-machine ssh default Thanks

Best regards,

Andrew Zhao (510) 375-9935 “When you are right
you cannot be too radical; when you are wrong, you cannot be too
conservative.”

Date: Mon, 21 Sep 2015 18:51:42 -0700
From: notifications@github.com
To: toolbox@noreply.github.com
CC: zhaohc10@hotmail.com
Subject: Re: [toolbox] "cannot enable tty mode on non tty input" when trying to run -it ubuntu bash 1.8.1c. (#136)

docker run -it ubuntu bash


Reply to this email directly or view it on GitHub.

@tiangolo

This comment has been minimized.

Show comment
Hide comment
@tiangolo

tiangolo Sep 24, 2015

Contributor

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 docker commands as normal.

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.

Contributor

tiangolo commented Sep 24, 2015

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 docker commands as normal.

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.

@r4j4h

This comment has been minimized.

Show comment
Hide comment
@r4j4h

r4j4h Sep 26, 2015

+1 this affects me on Windows 8.1. SSH'ing into the VM and running the command works with -t from there, but not from Windows cmd or other native-level shells.

r4j4h commented Sep 26, 2015

+1 this affects me on Windows 8.1. SSH'ing into the VM and running the command works with -t from there, but not from Windows cmd or other native-level shells.

@narita1980

This comment has been minimized.

Show comment
Hide comment
@narita1980

narita1980 Sep 28, 2015

+1 same with @austin881

narita1980 commented Sep 28, 2015

+1 same with @austin881

@jmorganca

This comment has been minimized.

Show comment
Hide comment
@jmorganca

jmorganca Sep 28, 2015

Contributor

Sorry for the delay. Looking into how we can update the Toolbox to fix this. Hadn't realized Git 2.5 had made such a drastic change.

Contributor

jmorganca commented Sep 28, 2015

Sorry for the delay. Looking into how we can update the Toolbox to fix this. Hadn't realized Git 2.5 had made such a drastic change.

@jmorganca

This comment has been minimized.

Show comment
Hide comment
@jmorganca

jmorganca Sep 28, 2015

Contributor

https://github.com/docker/toolbox/releases/tag/v1.8.2c should have this temporarily fixed. Sorry again for the delay.

As always, feel free to email me at jmorgan@docker.com

Contributor

jmorganca commented Sep 28, 2015

https://github.com/docker/toolbox/releases/tag/v1.8.2c should have this temporarily fixed. Sorry again for the delay.

As always, feel free to email me at jmorgan@docker.com

@adaminspace

This comment has been minimized.

Show comment
Hide comment
@adaminspace

adaminspace Sep 28, 2015

Yes, working OK now on Windows 10. Many thanks Jeff.

adaminspace commented Sep 28, 2015

Yes, working OK now on Windows 10. Many thanks Jeff.

@mchiang0610

This comment has been minimized.

Show comment
Hide comment
@mchiang0610

mchiang0610 Sep 28, 2015

Contributor

Thanks everyone for filing this issue. Closing this for now, but do reply back if you are still having problems with it. A more permanent solution will be in the works.

Contributor

mchiang0610 commented Sep 28, 2015

Thanks everyone for filing this issue. Closing this for now, but do reply back if you are still having problems with it. A more permanent solution will be in the works.

@avelinos

This comment has been minimized.

Show comment
Hide comment
@avelinos

avelinos Oct 1, 2015

Thanks for the temp fix. It does resolve the specific bug, however, my teammates who use Windows don't have access to any of the tools they already have installed on their boxes, like Maven. They could always install them in the Docker VM, but that ends up eating up more space and they'd have to reinstall all of the tools should they have to create another Docker VM. So, I hope the permanent solution works more like DockerToolbox 1.8.1b where they can use their tools immediately after installing DockerToolbox.

avelinos commented Oct 1, 2015

Thanks for the temp fix. It does resolve the specific bug, however, my teammates who use Windows don't have access to any of the tools they already have installed on their boxes, like Maven. They could always install them in the Docker VM, but that ends up eating up more space and they'd have to reinstall all of the tools should they have to create another Docker VM. So, I hope the permanent solution works more like DockerToolbox 1.8.1b where they can use their tools immediately after installing DockerToolbox.

@gmanfunky

This comment has been minimized.

Show comment
Hide comment
@gmanfunky

gmanfunky Oct 2, 2015

Instead of going into the limited use-case docker-machine ssh(f8c5201) a slightly better temporary fix, if staying with Git for windows using MSYS 2, could be

alias docker="winpty docker"

Winpty comes with the git for windows package being installed.

This should help with our expected windows use case of ``docker exec/run -it stuff` While in the MSYS2 Bash shell from Git for Windows.

Is there another open issue to pursue better fixes?

gmanfunky commented Oct 2, 2015

Instead of going into the limited use-case docker-machine ssh(f8c5201) a slightly better temporary fix, if staying with Git for windows using MSYS 2, could be

alias docker="winpty docker"

Winpty comes with the git for windows package being installed.

This should help with our expected windows use case of ``docker exec/run -it stuff` While in the MSYS2 Bash shell from Git for Windows.

Is there another open issue to pursue better fixes?

@mhailstone

This comment has been minimized.

Show comment
Hide comment
@mhailstone

mhailstone Oct 19, 2015

I am still experiencing this error in Windows 8.1. The winpty alias workaround did not work unfortunately. Here is my environment:

$ docker version
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 18:01:15 UTC 2015
OS/Arch: windows/amd64

Server:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 18:01:15 UTC 2015
OS/Arch: linux/amd64

$ docker info
Containers: 1
Images: 30
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 32
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.10-boot2docker
Operating System: Boot2Docker 1.8.3 (TCL 6.4); master : af8b089 - Mon Oct 12 18:56:54 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: default
ID: H7QM:57IH:CCD4:NPLN:X5J4:QTI5:G6XF:PFOC:ZSZZ:R53S:2XVA:JNRV
Debug mode (server): true
File Descriptors: 12
Goroutines: 16
System Time: 2015-10-19T16:24:47.969083209Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox

$ uname -a
MINGW64_NT-6.3 ITB-HPDV8PT 2.1.0(0.288/5/3) 2015-06-28 18:57 x86_64 Msys

mhailstone commented Oct 19, 2015

I am still experiencing this error in Windows 8.1. The winpty alias workaround did not work unfortunately. Here is my environment:

$ docker version
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 18:01:15 UTC 2015
OS/Arch: windows/amd64

Server:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 18:01:15 UTC 2015
OS/Arch: linux/amd64

$ docker info
Containers: 1
Images: 30
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 32
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.10-boot2docker
Operating System: Boot2Docker 1.8.3 (TCL 6.4); master : af8b089 - Mon Oct 12 18:56:54 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: default
ID: H7QM:57IH:CCD4:NPLN:X5J4:QTI5:G6XF:PFOC:ZSZZ:R53S:2XVA:JNRV
Debug mode (server): true
File Descriptors: 12
Goroutines: 16
System Time: 2015-10-19T16:24:47.969083209Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox

$ uname -a
MINGW64_NT-6.3 ITB-HPDV8PT 2.1.0(0.288/5/3) 2015-06-28 18:57 x86_64 Msys

@gmanfunky

This comment has been minimized.

Show comment
Hide comment
@gmanfunky

gmanfunky Oct 19, 2015

@mhailstone The winpty alias workaround was removed in the latest docker toolbox. (1.8.3)
Right now, the workaround is to manually prepend any interactive command with winpty

It sounds like we still could use a reminder.

gmanfunky commented Oct 19, 2015

@mhailstone The winpty alias workaround was removed in the latest docker toolbox. (1.8.3)
Right now, the workaround is to manually prepend any interactive command with winpty

It sounds like we still could use a reminder.

@gmanfunky

This comment has been minimized.

Show comment
Hide comment
@gmanfunky

gmanfunky Oct 19, 2015

@tiangolo - the alias trick results in problems when calling docker from inside scripts (like build scripts) and when redirecting input and output.

There was a bit of time where it looked like a bash function would do the trick and survive into sub-shells, but it failed when doing things like docker info > info.txt

Also, using winpty all the time apparently subjects docker.exe parameters to MSYS windows path conversion which was changing forward slash to a back slash when doing something like docker build --tag="testrepo/mysql":5.6.26 .

gmanfunky commented Oct 19, 2015

@tiangolo - the alias trick results in problems when calling docker from inside scripts (like build scripts) and when redirecting input and output.

There was a bit of time where it looked like a bash function would do the trick and survive into sub-shells, but it failed when doing things like docker info > info.txt

Also, using winpty all the time apparently subjects docker.exe parameters to MSYS windows path conversion which was changing forward slash to a back slash when doing something like docker build --tag="testrepo/mysql":5.6.26 .

@mhailstone

This comment has been minimized.

Show comment
Hide comment
@mhailstone

mhailstone Oct 19, 2015

@gmanfunky Thanks for the note and reminder. For basic -it option interaction the winpty seems to be working.

For mounting volumes, though, I am different issues. (This may warrant a new bug, but because this is really related to this workaround I'm keeping the thread here.) My virtual mounts and current working directory mounts are now not working correct. It doesn't recognize the paths specified. Here are the commands run from inside a bash script file:

docker run --name my_node_modules -v //opt/webroot/mycode/node_modules ubuntu 2> /dev/null
winpty docker run --rm -i -t -p 9000:9000 --name myrunningcontainer -v /$(pwd)/mycode://opt/webroot/mycode --volumes-from=my_node_modules -w //opt/webroot/mycode myimage sh -c "./run.sh"

Note: All paths here have a leading slash which is needed apparently when running from the Git bash shell for Windows. Also, if I remove the leading winpty and then the -i -t options, it will run just fine, but now I don't have my interactive terminal.

mhailstone commented Oct 19, 2015

@gmanfunky Thanks for the note and reminder. For basic -it option interaction the winpty seems to be working.

For mounting volumes, though, I am different issues. (This may warrant a new bug, but because this is really related to this workaround I'm keeping the thread here.) My virtual mounts and current working directory mounts are now not working correct. It doesn't recognize the paths specified. Here are the commands run from inside a bash script file:

docker run --name my_node_modules -v //opt/webroot/mycode/node_modules ubuntu 2> /dev/null
winpty docker run --rm -i -t -p 9000:9000 --name myrunningcontainer -v /$(pwd)/mycode://opt/webroot/mycode --volumes-from=my_node_modules -w //opt/webroot/mycode myimage sh -c "./run.sh"

Note: All paths here have a leading slash which is needed apparently when running from the Git bash shell for Windows. Also, if I remove the leading winpty and then the -i -t options, it will run just fine, but now I don't have my interactive terminal.

@tiangolo

This comment has been minimized.

Show comment
Hide comment
@tiangolo

tiangolo Oct 21, 2015

Contributor

Thanks @gmanfunky for the notes, I was seeing those issues with the output redirection with my script, so I just refactored it all, it's working better now and a lot cleaner.

https://github.com/tiangolo/babun-docker

I'm not using an alias in my script, it's rather a bit more complex function that uses Winpty only when needed, and also that auto-starts and sets the environment of the docker-machine when it fails to connect to it.

@mhailstone In case you are using Babun, here's the guide to make volumes work with it: Docker Volumes with Babun

Also, I will try to submit a Pull Request soon to integrate (and modify) my fix in the official toolbox.

Contributor

tiangolo commented Oct 21, 2015

Thanks @gmanfunky for the notes, I was seeing those issues with the output redirection with my script, so I just refactored it all, it's working better now and a lot cleaner.

https://github.com/tiangolo/babun-docker

I'm not using an alias in my script, it's rather a bit more complex function that uses Winpty only when needed, and also that auto-starts and sets the environment of the docker-machine when it fails to connect to it.

@mhailstone In case you are using Babun, here's the guide to make volumes work with it: Docker Volumes with Babun

Also, I will try to submit a Pull Request soon to integrate (and modify) my fix in the official toolbox.

@gary-harpaz

This comment has been minimized.

Show comment
Hide comment
@gary-harpaz

gary-harpaz Oct 27, 2015

Amazing I spent an entire day on this guys! This is very important because without this some dockers can't be run from the command line in Windows. It takes two steps.
My workaround: Works in Powershell

gary-harpaz commented Oct 27, 2015

Amazing I spent an entire day on this guys! This is very important because without this some dockers can't be run from the command line in Windows. It takes two steps.
My workaround: Works in Powershell

@Sandipbhole81

This comment has been minimized.

Show comment
Hide comment
@Sandipbhole81

Sandipbhole81 Nov 10, 2015

Hi Docker Team,

Currently I am building an QA automation in robot framework for docker interaction for which I am running "docker exec -it" or "sh test.sh" from Robot SSH library Execute Command . When I an trying to run Robot tests from Windows 7 system I am getting return code as msg="cannot enable tty mode on non tty input"

I have gone through all the thread but could not found any workaround to resolve my issue as I am executing this from Robot framework.

Can someone please help me...?

docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

Robot logs
Executing command 'sudo docker exec -it containerAlias cp /tmp/abc.csv /var/tmp'.
12:07:34.745 INFO Command exited with return code 1.
12:07:34.746 INFO ${Feed_the_docker} = ['', u'time="2015-11-10T06:37:34Z" level="fatal" msg="cannot enable tty mode on non tty input" ']

Regards,
Sandip

Sandipbhole81 commented Nov 10, 2015

Hi Docker Team,

Currently I am building an QA automation in robot framework for docker interaction for which I am running "docker exec -it" or "sh test.sh" from Robot SSH library Execute Command . When I an trying to run Robot tests from Windows 7 system I am getting return code as msg="cannot enable tty mode on non tty input"

I have gone through all the thread but could not found any workaround to resolve my issue as I am executing this from Robot framework.

Can someone please help me...?

docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

Robot logs
Executing command 'sudo docker exec -it containerAlias cp /tmp/abc.csv /var/tmp'.
12:07:34.745 INFO Command exited with return code 1.
12:07:34.746 INFO ${Feed_the_docker} = ['', u'time="2015-11-10T06:37:34Z" level="fatal" msg="cannot enable tty mode on non tty input" ']

Regards,
Sandip

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Nov 10, 2015

Member

@Sandipbhole81 docker 1.5 is really ancient, and will not get patch fixes.

Member

thaJeztah commented Nov 10, 2015

@Sandipbhole81 docker 1.5 is really ancient, and will not get patch fixes.

@Sandipbhole81

This comment has been minimized.

Show comment
Hide comment
@Sandipbhole81

Sandipbhole81 commented Nov 13, 2015

Thanks @thaJeztah

@KristerV

This comment has been minimized.

Show comment
Hide comment
@KristerV

KristerV Nov 26, 2015

in my case using -t made it work just fine. Actual command: ssh -t $ip "docker exec -it mongodb mongodump -o dump/$(date +%F)/";

KristerV commented Nov 26, 2015

in my case using -t made it work just fine. Actual command: ssh -t $ip "docker exec -it mongodb mongodump -o dump/$(date +%F)/";

@Sandipbhole81

This comment has been minimized.

Show comment
Hide comment
@Sandipbhole81

Sandipbhole81 Jan 14, 2016

Hi There
I have docker version as below and when I am running "docker exec -it" or "sh test.sh" from Robot SSH library Execute Command . When I an trying to run Robot tests from Windows 7.1 system I am getting return code as msg="cannot enable tty mode on non tty input".

Can someone please help .?
docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64

Sandipbhole81 commented Jan 14, 2016

Hi There
I have docker version as below and when I am running "docker exec -it" or "sh test.sh" from Robot SSH library Execute Command . When I an trying to run Robot tests from Windows 7.1 system I am getting return code as msg="cannot enable tty mode on non tty input".

Can someone please help .?
docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64

@Sandipbhole81

This comment has been minimized.

Show comment
Hide comment
@Sandipbhole81

Sandipbhole81 Jan 15, 2016

@thaJeztah Can you please provide your inputs on my issue..?

Sandipbhole81 commented Jan 15, 2016

@thaJeztah Can you please provide your inputs on my issue..?

@wuebbel

This comment has been minimized.

Show comment
Hide comment
@wuebbel

wuebbel Jan 17, 2016

Just had the same problem on cygwin. For me, using the native ssh client would work:

$ docker exec -it proto /bin/bash
cannot enable tty mode on non tty input
$ docker-machine ssh default docker exec -it proto /bin/bash
cannot enable tty mode on non tty input
exit status 1
$ docker-machine --native-ssh ssh default docker exec -it proto /bin/bash
wuebbel@proto:~$

Probably, the cygwin ssh should be called with the -t argument inside docker. But, as stated, the native ssh will solve my problem.

Best wishes, Frank

wuebbel commented Jan 17, 2016

Just had the same problem on cygwin. For me, using the native ssh client would work:

$ docker exec -it proto /bin/bash
cannot enable tty mode on non tty input
$ docker-machine ssh default docker exec -it proto /bin/bash
cannot enable tty mode on non tty input
exit status 1
$ docker-machine --native-ssh ssh default docker exec -it proto /bin/bash
wuebbel@proto:~$

Probably, the cygwin ssh should be called with the -t argument inside docker. But, as stated, the native ssh will solve my problem.

Best wishes, Frank

@jmorganca

This comment has been minimized.

Show comment
Hide comment
@jmorganca

jmorganca Jan 21, 2016

Contributor

This should be fixed in the Docker QuickStart Terminal - but not in other instances of Git Bash. In that case I think appending winpty is the best option.

Contributor

jmorganca commented Jan 21, 2016

This should be fixed in the Docker QuickStart Terminal - but not in other instances of Git Bash. In that case I think appending winpty is the best option.

@azizur

This comment has been minimized.

Show comment
Hide comment
@azizur

azizur Mar 28, 2016

Although this issue has been marked as Windows issue, I got the same issue on OSX.

azizur commented Mar 28, 2016

Although this issue has been marked as Windows issue, I got the same issue on OSX.

@darkn3rd

This comment has been minimized.

Show comment
Hide comment
@darkn3rd

darkn3rd May 11, 2016

I am having the same problem when running on Ubuntu Trusty Tahr Linux. It works from the command line, but fails from TeamCity.

darkn3rd commented May 11, 2016

I am having the same problem when running on Ubuntu Trusty Tahr Linux. It works from the command line, but fails from TeamCity.

@jlsphar

This comment has been minimized.

Show comment
Hide comment
@jlsphar

jlsphar Jun 15, 2016

Make sure you're not appending -t when launching the process from a non-tty environment.

Removing the -t per inotify-invoked docker cmd worked for me.

jlsphar commented Jun 15, 2016

Make sure you're not appending -t when launching the process from a non-tty environment.

Removing the -t per inotify-invoked docker cmd worked for me.

@rhoerbe

This comment has been minimized.

Show comment
Hide comment
@rhoerbe

rhoerbe Jun 20, 2016

removing -t worked for me as well (centos 7/docker 1.11.2)

rhoerbe commented Jun 20, 2016

removing -t worked for me as well (centos 7/docker 1.11.2)

@johanchouquet

This comment has been minimized.

Show comment
Hide comment
@johanchouquet

johanchouquet Jul 18, 2017

@jlsphar & @rhoerbe , it totally worked for me. I was able to just launch the container and in another terminal, I could go & see stuff, modify files etc... Thanks!

johanchouquet commented Jul 18, 2017

@jlsphar & @rhoerbe , it totally worked for me. I was able to just launch the container and in another terminal, I could go & see stuff, modify files etc... Thanks!

@f-w

This comment has been minimized.

Show comment
Hide comment
@f-w

f-w Sep 14, 2017

Removing -t doesn't work for me

x@x MINGW64 /
$ docker run -i <some-docker-image> bash
C:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

f-w commented Sep 14, 2017

Removing -t doesn't work for me

x@x MINGW64 /
$ docker run -i <some-docker-image> bash
C:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment