-
Notifications
You must be signed in to change notification settings - Fork 87
Interactivity to container doesn't work for named pipe connections #120
Comments
I experience this as well. Currently the easiest way (IMO) to interact with the container is to create a PowerShell direct session after the container is started. $container = Invoke-ContainerImage -Detach -Isolation HyperV -Image $image -PassThru
Enter-PSSession -ContainerId $container.ID -RunAsAdministrator |
@bgelens What if the host is Windows, and the container is Linux? |
@Jaykul in that case I would fall back to docker cli for the moment. Although the new LIS version has added Hyper-V socket support (theoretically, we could attach over VM Bus as well) |
@Jaykul I realize now the issue is ambiguously phrased... At the moment these cmdlets run on Windows host only, so the scenario I'm referring to is exactly that: when pointed at a Linux daemon, interactivity works fine, but when pointed at a Windows docker daemon output is displayed but input hangs. I'll update the title to clarify. If you use the cmdlets to manage a Linux daemon things should work fine. |
@swernli hm, interactivity doesn't work me. Eg.:
...starts the container and presents Debian/bash prompt, but just hangs and doesn't accept input. Am I doing it wrong? |
That's very strange... it works for me: But the hanging at input is exactly what I see when using a Windows container. Where is your daemon running? Perhaps there is something different about the connections we are using... |
@swernli it's running in Docker for Windows. Tested from powershell |
Ah, that could be the difference... I'm not sure what transport Docker for Windows uses. I've actually never used Docker for Windows myself; I'm testing this by connecting to an Ubuntu VM that I've set up manually as a docker host. Do you know what communication mechanism is used by the VM that Docker for Windows creates? |
@swernli named pipe over Hyper-V socket |
Yeah, then this is likely the same issue that's affecting Windows containers, as those use named pipe as well. This is sounding like a generic named pipe issue, so I'll update the title and description to make clear that it tracks both problems. Hopefully I can find a solution soon... |
When using any of the cmdlets that provide an interactive session with the container (Enter-ContainerSession, Run-ContainerImage, Exec-Container), the resulting session will work fine when connected to the daemon by tcp or unix socket, but fails to accept input and hangs when connected via named pipe. Still not sure why, investigation ongoing...
The text was updated successfully, but these errors were encountered: