mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-20 10:27:46 +08:00

Removes gogo/protobuf from buildx and updates to a version of moby/buildkit where gogo is removed. This also changes how the proto files are generated. This is because newer versions of protobuf are more strict about name conflicts. If two files have the same name (even if they are relative paths) and are used in different protoc commands, they'll conflict in the registry. Since protobuf file generation doesn't work very well with `paths=source_relative`, this removes the `go:generate` expression and just relies on the dockerfile to perform the generation. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
51 lines
1.9 KiB
Markdown
51 lines
1.9 KiB
Markdown
# buildx prune
|
|
|
|
```text
|
|
docker buildx prune
|
|
```
|
|
|
|
<!---MARKER_GEN_START-->
|
|
Remove build cache
|
|
|
|
### Options
|
|
|
|
| Name | Type | Default | Description |
|
|
|:------------------------|:---------|:--------|:-----------------------------------------------|
|
|
| `-a`, `--all` | `bool` | | Include internal/frontend images |
|
|
| [`--builder`](#builder) | `string` | | Override the configured builder instance |
|
|
| `-D`, `--debug` | `bool` | | Enable debug logging |
|
|
| `--filter` | `filter` | | Provide filter values (e.g., `until=24h`) |
|
|
| `-f`, `--force` | `bool` | | Do not prompt for confirmation |
|
|
| `--max-storage` | `bytes` | `0` | Maximum amount of disk space to keep for cache |
|
|
| `--min-storage` | `bytes` | `0` | Minimum amount of disk space to keep for cache |
|
|
| `--verbose` | `bool` | | Provide a more verbose output |
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
|
|
|
## Description
|
|
|
|
Clears the build cache of the selected builder.
|
|
|
|
You can finely control what cache data is kept using:
|
|
|
|
- The `--filter=until=<duration>` flag to keep images that have been used in
|
|
the last `<duration>` time.
|
|
|
|
`<duration>` is a duration string, e.g. `24h` or `2h30m`, with allowable
|
|
units of `(h)ours`, `(m)inutes` and `(s)econds`.
|
|
|
|
- The `--keep-storage=<size>` flag to keep `<size>` bytes of data in the cache.
|
|
|
|
`<size>` is a human-readable memory string, e.g. `128mb`, `2gb`, etc. Units
|
|
are case-insensitive.
|
|
|
|
- The `--all` flag to allow clearing internal helper images and frontend images
|
|
set using the `#syntax=` directive or the `BUILDKIT_SYNTAX` build argument.
|
|
|
|
## Examples
|
|
|
|
### <a name="builder"></a> Override the configured builder instance (--builder)
|
|
|
|
Same as [`buildx --builder`](buildx.md#builder).
|