Skip to content

Commit

Permalink
Merge pull request #2136 from dvdksn/docs-du-verbose
Browse files Browse the repository at this point in the history
docs: add buildx du verbose example
  • Loading branch information
tonistiigi authored Nov 22, 2023
2 parents 0962fdb + 5bf02d9 commit 752680e
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions docs/reference/buildx_du.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Disk usage
|:------------------------|:---------|:--------|:-----------------------------------------|
| [`--builder`](#builder) | `string` | | Override the configured builder instance |
| `--filter` | `filter` | | Provide filter values |
| `--verbose` | | | Provide a more verbose output |
| [`--verbose`](#verbose) | | | Provide a more verbose output |


<!---MARKER_GEN_END-->
Expand Down Expand Up @@ -49,7 +49,7 @@ If `RECLAIMABLE` is false, the `docker buildx du prune` command won't delete
the record, even if you use `--all`. That's because the record is actively in
use by some component of the builder.

The asterisks (\*) in the output indicate the following:
The asterisks (\*) in the default output indicate the following:

- An asterisk next to an ID (`zu7m6evdpebh5h8kfkpw9dlf2*`) indicates that the record
is mutable. The size of the record may change, or another build can take ownership of
Expand All @@ -60,6 +60,35 @@ The asterisks (\*) in the output indicate the following:
If you prune such a record then you will lose build cache but only metadata
will be deleted as the image still needs to actual storage layers.

### <a name="verbose"></a> Use verbose output (--verbose)

The verbose output of the `docker buildx du` command is useful for inspecting
the disk usage records in more detail. The verbose output shows the mutable and
shared states more clearly, as well as additional information about the
corresponding layer.

```console
$ docker buildx du --verbose
...
Last used: 2 days ago
Type: regular

ID: 05d0elirb4mmvpmnzbrp3ssrg
Parent: e8sfdn4mygrg7msi9ak1dy6op
Created at: 2023-11-20 09:53:30.881558721 +0000 UTC
Mutable: false
Reclaimable: true
Shared: false
Size: 0B
Description: [gobase 3/3] WORKDIR /src
Usage count: 3
Last used: 24 hours ago
Type: regular

Reclaimable: 4.453GB
Total: 4.453GB
```

### <a name="builder"></a> Override the configured builder instance (--builder)

Use the `--builder` flag to inspect the disk usage of a particular builder.
Expand Down

0 comments on commit 752680e

Please sign in to comment.