Skip to content

docker stats byname conflict with docker rename #27937

@coolljt0725

Description

@coolljt0725

Description
Use docker stats byname to display the statistic of the container and then rename the container,
the container name display in CONTAINER column does not change.

[lei@fedora docker]$ docker run -tid --name test busybox
308fb0316bc67722a242b7ca50b5ad57735318bd1b38002e5820ed8ea0ca9d6d
[lei@fedora docker]$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
308fb0316bc6        busybox             "sh"                3 seconds ago       Up 2 seconds                            test
[lei@fedora docker]$ docker rename test foo
[lei@fedora docker]$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
308fb0316bc6        busybox             "sh"                34 seconds ago      Up 33 seconds                           foo

CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
test                0.00%               168 KiB / 3.858 GiB   0.00%               0 B / 648 B         0 B / 0 B           1

Steps to reproduce the issue:

  1. docker run -tid --name test busybox
  2. docker stats test
  3. docker rename test foo

Describe the results you received:
the container name in CONTAINER column remain unchanged after docker rename

Describe the results you expected:
the container name in CONTAINER of docker stats should changed after docker rename

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

Output of docker version:

(paste your output here)

Output of docker info:

(paste your output here)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliClientkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions