mirror of https://github.com/docker/cli.git
Merge pull request #1697 from forestjohnsonpeoplenet/patch-1
Explain -s flag on docker ps
This commit is contained in:
commit
5ff3c4eef9
|
@ -75,6 +75,22 @@ $ docker ps -a
|
||||||
container that exposes TCP ports `100, 101, 102` displays `100-102/tcp` in
|
container that exposes TCP ports `100, 101, 102` displays `100-102/tcp` in
|
||||||
the `PORTS` column.
|
the `PORTS` column.
|
||||||
|
|
||||||
|
### Show disk usage by container
|
||||||
|
|
||||||
|
The `docker ps -s` command displays two different on-disk-sizes for each container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker ps -s
|
||||||
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE SIZE
|
||||||
|
e90b8831a4b8 nginx "/bin/bash -c 'mkdir " 11 weeks ago Up 4 hours my_nginx 35.58 kB (virtual 109.2 MB)
|
||||||
|
00c6131c5e30 telegraf:1.5 "/entrypoint.sh" 11 weeks ago Up 11 weeks my_telegraf 0 B (virtual 209.5 MB)
|
||||||
|
```
|
||||||
|
* The "size" information shows the amount of data (on disk) that is used for the _writable_ layer of each container
|
||||||
|
* The "virtual size" is the total amount of disk-space used for the read-only _image_ data used by the container and the writable layer.
|
||||||
|
|
||||||
|
For more information, refer to the [container size on disk](https://docs.docker.com/storage/storagedriver/#container-size-on-disk) section.
|
||||||
|
|
||||||
|
|
||||||
### Filtering
|
### Filtering
|
||||||
|
|
||||||
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
|
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
|
||||||
|
@ -432,4 +448,4 @@ a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd
|
||||||
01946d9d34d8
|
01946d9d34d8
|
||||||
c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6
|
c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6
|
||||||
41d50ecd2f57 com.docker.swarm.node=fedora,com.docker.swarm.cpu=3,com.docker.swarm.storage=ssd
|
41d50ecd2f57 com.docker.swarm.node=fedora,com.docker.swarm.cpu=3,com.docker.swarm.storage=ssd
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue