cli icon indicating copy to clipboard operation
cli copied to clipboard

`docker stats <container>` doesn't exit gracefully

Open vvoland opened this issue 9 months ago • 1 comments

Description

docker stats (all containers) correctly reacts to Ctrl+C However, invoking it for a specific container with docker stats <container> doesn't properly respect the termination signal - stats are not refreshed, but the CLI still doesn't exit.

https://github.com/user-attachments/assets/bd2053ee-ead2-4ce0-b109-c24fd99e95ff

Reproduce

docker stats <container>

Expected behavior

No response

docker version

Client:
 Version:           master
 API version:       1.48
 Go version:        go1.23.7
 Git commit:        6523832
 Built:             Wed Apr  2 12:48:25 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Moby Engine - Nightly
 Engine:
  Version:          master
  API version:      1.48 (minimum version 1.24)
  Go version:       go1.23.7
  Git commit:       bea4de25004da0460f80ac1e0f1628e66b058287
  Built:            Tue Mar 18 18:51:26 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

-

Additional Info

No response

vvoland avatar May 21 '25 14:05 vvoland

Thx! Probably a container.wait that's setup and isn't handled.

I was also looking at another issue that could be related (https://github.com/containerd/nerdctl/issues/4219). I had a branch somewhere where I started trying some options, but I have to dig it up.

thaJeztah avatar May 21 '25 14:05 thaJeztah

still have same bug

PasaOpasen avatar Sep 15 '25 12:09 PasaOpasen