docs: final cache storage fixups

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2022-09-22 10:50:59 +01:00
parent 91f0ed3fc3
commit f823d3c73c
3 changed files with 13 additions and 12 deletions

View File

@@ -8,6 +8,14 @@ and your cache output. This means that if you're using a particularly complex
build flow, or not exporting your images directly to a registry, then you may
want to consider the [registry](./registry.md) cache.
## Synopsis
```console
$ docker buildx build . --push -t <registry>/<image> \
--cache-to type=inline \
--cache-from type=registry,ref=<registry>/image
```
To export cache using `inline` storage, pass `type=inline` to the `--cache-to`
option:
@@ -30,15 +38,6 @@ the specified registry:
$ docker buildx build . --push -t <registry>/<image> --cache-from type=registry,ref=<registry>/<image>
```
Most of the time, you'll want to have each build both import and export cache
from the cache store. To do this, specify both `--cache-to` and `--cache-from`:
```console
$ docker buildx build . --push -t <registry>/<image> \
--cache-to type=inline \
--cache-from type=registry,ref=<registry>/<image>
```
## Further reading
For an introduction to caching see