cli
cli copied to clipboard
Proposal: 'volume inspect' should show data usage
Description For practical needs I propose the cli show the volume size on the default inspect format, so the user don't have to run
docker volume system df
or
docker volume system df -v
To realize the current size of the running volume.
Just don't want to make a PR before asking. If approved I'll make the PR.
Actual behavior:
[
{
"CreatedAt": "2017-09-29T09:14:12-05:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "myApp",
"com.docker.compose.volume": "db-postgres"
},
"Mountpoint": "/var/lib/docker/volumes/myApp_db-postgres/_data",
"Name": "myApp_db-postgres",
"Options": {},
"Scope": "local"
}
]
Proposal behavior:
[
{
"CreatedAt": "2017-09-29T09:14:12-05:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "myApp",
"com.docker.compose.volume": "db-postgres"
},
"Mountpoint": "/var/lib/docker/volumes/myApp_db-postgres/_data",
"Name": "myApp_db-postgres",
"Options": {},
"Size": "90MB",
"Scope": "local"
}
]
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
Client:
Version: 17.07.0-ce-rc2
API version: 1.31
Go version: go1.8.3
Git commit: 36ce605
Built: Mon Aug 7 23:45:34 2017
OS/Arch: linux/amd64
Server:
Version: 17.07.0-ce-rc2
API version: 1.31 (minimum version 1.12)
Go version: go1.8.3
Git commit: 36ce605
Built: Mon Aug 7 23:46:55 2017
OS/Arch: linux/amd64
Experimental: false
Output of docker info
:
Containers: 10
Running: 8
Paused: 0
Stopped: 2
Images: 68
Server Version: 17.07.0-ce-rc2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3addd840653146c90a254301d6c3a663c7fd6429
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.12.13-300.fc26.x86_64
Operating System: Fedora 26 (Workstation Edition)
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 15.59GiB
Name: Highwind
ID: 2WLY:Z6ID:XV65:VHRM:JBQR:W67K:R3JQ:ISDF:V5PY:CNRN:Q3VX:TSWF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.): physical