You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Executing an interactive terminal needs keystroke after exiting #1171
When you exit an interactive terminal (you can either "docker run" a shell with a container or "docker exec" a shell in an already running one) it waits for a keystroke before you get back to your command shell and it displays its prompt again.
I have been trying to use testcontainers with Rancher Desktop (that's why I used dockerd). Testcontainers executes commands in running containers for example to test for some docker requirements on startup or to see if a container has opened its exposed port.
All this hangs on execution and runs in a Timeout (or just grinds to a halt) and it might be that this is due to the "not really exiting" problem I described here.
Also I think this could break scripts that just execute a single command (like trivy checking etc.).
Steps to Reproduce
Run Rancher Desktop with dockerd container runtime.
In a cmd shell execute "docker run -it --rm alpine sh".
Exit the container shell by executing "exit".
Result
The cmd shell does not display its prompt but you have to press any key to get back into the cmd shell.
Expected Behavior
The command should completely exit and should not wait for a keystroke.
Additional Information
No response
Reacted by Denis Blanchette, Thijs van Loef, Ulrich Grave, Chris Aurora Neumann Ruud, Mileta Cekovic, Sergei Egorov, Kevin Wittek, Gennady and DmitriiSolovev
Same here on Windows 10 21H1 with Rancher 0.7.1. This break scripts calling docker command since it never knows when the command exited which is a pretty major blocker for us.
This is the last issue for the 1.0.0-beta milestone. Any chance that this will be fixed soon?
This is the only thing that really prevents us from using RancherDektop because we use testcontainers in our Java-JUnit-Tests and this behaviour breaks almost all the JUnit-Tests.
So a major blocker for us too. Would be great if this was fixed!
Reacted by Everton Peres, Chris Aurora Neumann Ruud and DmitriiSolovev
To give more details:
I suspect our proxy process is buffering too much, which means the /containers/{id}/wait connection is not closing properly (so the client couldn't tell when it should detach).
Oddly, watching /wait and force-closing the /attach connection fixes the issue, but that seems… very suspect?
Making API calls directly, it appears that /wait actually is working correctly; that returns when the container is closed. So we'll have to forcefully terminate the /attach connection instead (which seems wrong).
Activity
evertonlperes commentedon Jan 3, 2022
Issue replicated on Windows 10 PRO, using both
cmdandpowershellconsole.Linux and macOS are working as expected.
dblanchette commentedon Jan 5, 2022
Same here on Windows 10 21H1 with Rancher 0.7.1. This break scripts calling docker command since it never knows when the command exited which is a pretty major blocker for us.
jhollmannk commentedon Jan 24, 2022
This is the last issue for the 1.0.0-beta milestone. Any chance that this will be fixed soon?
This is the only thing that really prevents us from using RancherDektop because we use testcontainers in our Java-JUnit-Tests and this behaviour breaks almost all the JUnit-Tests.
So a major blocker for us too. Would be great if this was fixed!
gaktive commentedon Jan 25, 2022
@jhollmannk This will take a bit longer, alas, so we'll target this for right after 1.0.
mook-as commentedon Jan 25, 2022
To give more details:
I suspect our proxy process is buffering too much, which means the
/containers/{id}/waitconnection is not closing properly (so the client couldn't tell when it should detach).Oddly, watching
/waitand force-closing the/attachconnection fixes the issue, but that seems… very suspect?mook-as commentedon Jan 27, 2022
Making API calls directly, it appears that
/waitactually is working correctly; that returns when the container is closed. So we'll have to forcefully terminate the/attachconnection instead (which seems wrong).