Open G07cha opened 7 years ago
This looks like a documentation issue; the Containers
count is only propagated for the /system/df
endpoint https://docs.docker.com/engine/api/v1.30/#operation/SystemDataUsage, which uses the same backend, but fetches additional properties; https://github.com/moby/moby/blob/950d472c9ce4180b80e28030f7de68ffc3254f97/daemon/images.go#L192-L221
So what's the goal of that Containers
field in the Image object if it can only be retrieved using the system/df
endpoint?
Description
On querying images list each image list will be having
Containers
property with value -1 regardless of amount of containers using this image.Steps to reproduce the issue:
docker run -ti ubuntu bash
)curl --unix-socket /var/run/docker.sock "http:/v1.30/images/json"
)Describe the results you received:
"ubuntu" image has
Containers
property with value -1.Describe the results you expected:
Containers
property with value 1Output of
docker version
:Output of
docker info
: