Skip to content
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

No output when running hello-world without -i over WSL 2 Docker context #3586

Open
major-mayer opened this issue May 3, 2022 · 1 comment · May be fixed by #4548
Open

No output when running hello-world without -i over WSL 2 Docker context #3586

major-mayer opened this issue May 3, 2022 · 1 comment · May be fixed by #4548

Comments

@major-mayer
Copy link

Description
I am using Docker in a WSL 2 Ubuntu 22.04 instance and connect to it using a seperate Docker context.

PS C:\Users\laurenz> docker context ls
NAME            DESCRIPTION                               DOCKER ENDPOINT                             KUBERNETES ENDPOINT   ORCHESTRATOR
default         Current DOCKER_HOST based configuration   npipe:////./pipe/docker_engine                                    swarm
desktop-linux                                             npipe:////./pipe/dockerDesktopLinuxEngine
linux *                                                   tcp://127.0.0.1:2375

Everything runs fine, however when i run container like this docker run hello-world in the Windows Powershell (or CMD, i tried both), there is no error but also no output.
The command just finishes like nothing happened.
If i execute the same command in the Ubuntu WSL VM it displays the usual hello-world information.

Interestingly if i add the -i argument to keep the STDIN open, the text also appears, but this is not ideal of course.

PS C:\Users\laurenz> docker run --rm -i hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

I wonder where this comes from and how i can solve it. Is there some streams incorrectly redirected?

Steps to reproduce the issue:

  1. Execute docker run hello-world

Describe the results you received:
No output is displayed, but also no error.

Describe the results you expected:
The usuals hello-world text should be displayed.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

PS C:\Users\laurenz> docker version
Client:
 Version:           20.10.14
 API version:       1.41
 Go version:        go1.16.15
 Git commit:        a224086
 Built:             Thu Mar 24 01:53:11 2022
 OS/Arch:           windows/amd64
 Context:           linux
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.14
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.15
  Git commit:       87a90dc
  Built:            Thu Mar 24 01:45:38 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.5.11
  GitCommit:        3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc:
  Version:          1.0.3
  GitCommit:        v1.0.3-0-gf46b6ba
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info:

PS C:\Users\laurenz> docker info
Client:
 Context:    linux
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.6.3)
  compose: Docker Compose (Docker Inc., v2.0.0)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 10
  Running: 0
  Paused: 0
  Stopped: 10
 Images: 2
 Server Version: 20.10.14
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc version: v1.0.3-0-gf46b6ba
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.104-microsoft-standard
 Operating System: Ubuntu 22.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 24.96GiB
 Name: steela-gerrera
 ID: FCUB:KU52:UX7F:SWE5:BOJ4:GIT5:5I7G:A4ZQ:UJNK:HYAW:24YV:XHEV
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: API is accessible on http://127.0.0.1:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/go/attack-surface/
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Additional environment details (AWS, VirtualBox, physical, etc.):

@rcsilva83
Copy link

rcsilva83 commented Nov 28, 2022

Same problem here. However, I think it must be a problem with Docker Server because I tested with Docker Desktop and it works. The same command running on the same docker-cli but with podman backend I get no output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants