Open bbigras opened 8 years ago
Sorry for the late response. Looks like is a bug in docker https://github.com/docker/docker/issues/12469. I currently don't have a windows machine to test it, but if you find a fix or workaround, patches are welcome
Also getting a similar issue with more recent issues of the packages in question, including the Docker for Windows preview. Just running Emacs from Windows gives me an error telling me that Docker can't use a non-TTY input and suggesting the use of winpty
. Editing docker-tramp.el
to prepend winpty
to the executable name results in the error input is not a tty
.
I got this problem too with the Emacs 25.3 on windows 7.
I've encountered this as well, anyone have news on the issue?
Anyone resolve this? Has anyone tired using babun-docker?
I managed to make emacs call docker
with winpty
, but then winpty
complains that stdin is not a tty
. I get the same error when trying to manually run "c:\Program Files\Git\usr\bin\winpty" docker exec -it friendly_hawking sh
in emacs' shell.
(setf
;; Login program
(rest
(assoc 'tramp-login-program
(rest (assoc "docker" tramp-methods))))
(list
(format "\"%s\""
(expand-file-name (concat (file-name-directory (executable-find "git")) "../usr/bin/winpty.exe"))))
;; Arguments
(rest
(assoc 'tramp-login-args
(rest (assoc "docker" tramp-methods))))
`((,docker-tramp-docker-options ("docker") ("exec" "-it") ("-u" "%u") ("%h") ("sh"))))
Then I tried without winpty
.
-t
instead of -it
, emacs got struck at Waiting for prompts from remote shell...
.-i
instead of -it
, emacs got stuck right after having detected a prompt from the remote shell.I have never found a way to make the emacs shell interface with docker directly, this is a problem with emacs, and when I filled a ticket they seemed to think I was crazy. But I cannot get this to work :(
Emacs shell processes on Windows only works with pipes, tty is not supported at the moment. There may be hope with the new windows console but someone have to implement support for it.
same issue. Any one have resolved this yet or are there any workaround?
Sadly it seems there is still no workaround with Emacs 29.1. I am using Windows 10 and would like to use Emacs to work in dev containers, but it's not possible because of this.
To reproduce open a command line window and start a docker container: docker run -it --rm bash
.
Open another command line window and find out the name of the just started container:
$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
94c0f4a982e0 bash "docker-entrypoint.s…" 12 minutes ago Up 12 minutes clever_panini
Start Emacs: emacs -q
.
Try to open a file or directory in the container: C-x C-f RET
, /docker:clever_panini:/etc
A Tramp error window pops up showing:
docker exec -it clever_panini /bin/sh -i && exit || exit
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
This can be reproduced in the Emacs shell too: emacs -q
, M-x eshell
, then:
~ $ docker run -it --rm bash
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
Messages
tramp/docker bbigras@flapjack
I have sh from Git For Windows (C:\Program Files\Git\usr\bin\sh.exe).
GNU Emacs 24.5.1 (x86_64-w64-mingw32) of 2015-05-16 on KAEL