Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit b75545f

Browse files
forestjohnsonpeoplenetthaJeztah
authored andcommitted
Explain -s flag on docker ps
docker/docs#1520 (comment) Signed-off-by: Forest Johnson <fjohnson@peoplenetonline.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f7ab2987c39162cd47c2f1738d1590e7226b5537) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: c4e5fd7e53a5a3dc89734c391099aed8b8a0b795 Component: cli
1 parent 8a39b06 commit b75545f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

  • components/cli/docs/reference/commandline

components/cli/docs/reference/commandline/ps.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ $ docker ps -a
7575
container that exposes TCP ports `100, 101, 102` displays `100-102/tcp` in
7676
the `PORTS` column.
7777

78+
### Show disk usage by container
79+
80+
The `docker ps -s` command displays two different on-disk-sizes for each container:
81+
82+
```bash
83+
$ docker ps -s
84+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE SIZE
85+
e90b8831a4b8 nginx "/bin/bash -c 'mkdir " 11 weeks ago Up 4 hours my_nginx 35.58 kB (virtual 109.2 MB)
86+
00c6131c5e30 telegraf:1.5 "/entrypoint.sh" 11 weeks ago Up 11 weeks my_telegraf 0 B (virtual 209.5 MB)
87+
```
88+
* The "size" information shows the amount of data (on disk) that is used for the _writable_ layer of each container
89+
* 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.
90+
91+
For more information, refer to the [container size on disk](https://docs.docker.com/storage/storagedriver/#container-size-on-disk) section.
92+
93+
7894
### Filtering
7995

8096
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more
@@ -431,4 +447,4 @@ a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd
431447
01946d9d34d8
432448
c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6
433449
41d50ecd2f57 com.docker.swarm.node=fedora,com.docker.swarm.cpu=3,com.docker.swarm.storage=ssd
434-
```
450+
```

0 commit comments

Comments
 (0)