-
Notifications
You must be signed in to change notification settings - Fork 852
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
Can not use docker.exe to run interactive docker containers from inside WSL, can not use arrow keys inside docker-compose.exe run containers #2379
Comments
@veqryn This is a docker.exe issue, I believe. It is not aware of the new console functionality and probably duplicates it to some degree. We saw similar problems on Win32-OpenSSH. Basically, when compiling docker.exe, they need to flip a few console flags up on the IO handles and disable their built-in terminal emulation code to allow the Windows console to take over processing. This is some related documentation: https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx Right now, I believe even if they do enable this, there might still be some bugs, since vt ctlseq processing functionality is incomplete in a few areas and buggy in others (look at the console tag on here). On the other hand, is there any reason why you're using docker.exe instead of the Linux docker-client executable? That should be able to connect to the hyper-v docker container host or a remote linux docker host just as well as docker.exe. |
The main reason is because i so not want to open my local laptop ports up, as it is a security issue. |
@veqryn Pretty sure you don't need to open any ports to the outside world if the hyper-v virtual switch is a private switch rather than a shared switch that allows internet connectivity. You could even add another virtual switch and network adapter to the VM, make that private, and open the control port on the adapter connected to the private switch only, allowing local control and also firewalled access to the internet. Edit: Ah, it looks like you ended up doing something like this. |
So, I'm mostly basing my opinion off the fact that I have to go into Docker for Windows settings, then click the checkbox that reads:
That sounds pretty scary, right? Docker for Windows creates an "internal" network switch in hyperv, but I'm not exactly sure how the docker.exe client on the windows host communicates with the docker server running in hyperv. |
It communicates by IP. This has been the recommended method from WSL for ages. Hyper-V VMs run in full hypervisor-level isolation. Pretty sure a non-IP method of communication would be pretty bad. Also, since docker-client communications don't need high levels of bandwidth or ultra-low latency, it makes like no sense to create a de novo communication interface. |
Well, I've tried connecting telling the docker client to connect to 10.0.75.0:2375 (the IP of the internal virtual switch's ip), but no luck. |
What about exposing the port and then setting up a firewall rule? Getting the same |
That's #2406 |
Is there any planned fix for this issue? Can someone share an update? |
The OP submission here was:
Appears to be okay on WSL2 with Windows Terminal. It was not reproduced locally back in 2017. There was were no repro steps for the |
Can not use docker.exe to run interactive docker containers from inside WSL, can not use arrow keys inside docker-compose.exe run containers.
Your Windows build number: Microsoft Windows [Version 10.0.15063]
What you're doing and what's happening:
From inside WSL Bash:
That last line is me hitting the UP-Arrow key, expecting to see
pwd
fill my command prompt, but instead getting a bunch of^[[A^[[A^[[B^[[A
I would expect that I could use the native windows docker.exe to run interactive containers and also exec into containers.
I'm not sure why docker.exe complains but docker-compose.exe does not complain.
I would also expect that docker-compose run (interactively) would behavior normally, instead of printing out all my commands, extra line returns, and not letting me use the UP-Arrow to navigate previous commands.
I had greatly hoped to be able to use the windows docker executables already installed on my system.
Instead, in order to get my desired behavior, I had to install the linux docker executables into WSL, and then expose the Docker Daemon TCP Host on localhost (which is a security issue!), and then point the linux docker executables at it (ie: the way people did docker in wsl before the creator's update).
The text was updated successfully, but these errors were encountered: