-
Notifications
You must be signed in to change notification settings - Fork 298
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
container output while using docker run and exec is not captured to stdout #3838
Comments
Hi @attilaersek Thanks for filing this bug. Do you get any responsiveness upon hitting a key when the docker command without the This sounds somewhat similar to what was reported earlier in #1361 but your case reads like the opposite, especially since the earlier behaviour was fixed. I'll keep investigating this and try to reproduce this behaviour. Otherwise, to confirm, are you running this in Powershell, the Windows terminal or another command line option? |
It's responsive and otherwise works correctly: $ time (docker run --rm hello-world)
real 0m1.249s
user 0m0.045s
sys 0m0.022s
$ time (docker run --rm -i hello-world)
Hello from Docker!
This message shows that your installation appears to be working correctly.
...
real 0m1.057s
user 0m0.012s
sys 0m0.046s The container run correctly and the logs can be read: $ docker run --name hello-world hello-world
$ docker logs hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly. The
I'm using Windows Terminal 1.15.3466.0 with WSL2 Ubuntu 22.04.1: $ wsl.exe --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1105
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
~ ⎈ rancher-desktop $
$ uname -a
Linux GT-DT-192703 5.15.79.1-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux WSL2 integration is enabled and configured in rancher desktop: $ which docker
/mnt/c/Users/AttilaÉrsek/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/bin/docker
$ docker --version
Docker version 20.10.21-rd, build ac29474 Interesting, but when i try the same command from other shells in Windows Terminal it works, so the problem seems to be limited to the Ubuntu 22.04.01 WSL2 bash shell. from rancher-dekstop shell: ~ # docker run --rm hello-world
Hello from Docker! from powershell: PS C:\Program Files\Microsoft Visual Studio\2022\Community> docker run --rm hello-world
Hello from Docker! from cmd: Microsoft Windows [Version 10.0.22621.1105]
(c) Microsoft Corporation. All rights reserved.
C:\Users\AttilaÉrsek>docker run --rm hello-world
Hello from Docker! |
I've installed docker cli using homebrew and got the same behavior so this seems to be an Ubuntu/WSL issue and not rancher-desktop. $ which docker
/usr/bin/docker
$ docker --version
Docker version 20.10.23, build 7155243
$ docker run --rm hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly. |
Thanks for your updates @attilaersek and I'm glad you've narrowed down what's going on. Shall I go ahead and close this, or do you have any other questions? |
Well I just sorted out that the problem is not related to the docker cli client version. With docker-ce or docker desktop service the output works, but not with rancher-desktop. |
No, this is a bug in Rancher Desktop that needs to be fixed. It only affects the Linux client (on WSL), but not the Win32 one: jan@DESKTOP-4992680:~$ docker.exe run busybox uname -m
x86_64
jan@DESKTOP-4992680:~$ docker run busybox uname -m
jan@DESKTOP-4992680:~$ docker run -i busybox uname -m
x86_64 And it works properly on the macOS version: $ docker run busybox uname -m
x86_64 |
I'm going to close this as a duplicate of #3239 though. |
Actual Behavior
The output of a container is not captured and sent to stdout, eg.:
displays nothing.
If the
--interactive
flag is provided (which normally used to capture stdin) then the output is displayed correctly:docker run --rm -i hello-world Hello from Docker! This message shows that your installation appears to be working correctly.
This breaks the functionality of some applications that rely on
docker exec
output, like kind. see: 3065Steps to Reproduce
run command:
Result
empty result.
Expected Behavior
container output is displayed on stdout.
Additional Information
No response
Rancher Desktop Version
1.70.
Rancher Desktop K8s Version
1.25.5
Which container engine are you using?
moby (docker cli)
What operating system are you using?
Windows
Operating System / Build Version
Windows 11 22621.1105 using WSL2 Ubuntu 22.04.1
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
n/a
The text was updated successfully, but these errors were encountered: