Merge pull request #2378 from dvdksn/docs-crossref-secrets

docs: add cross-reference about build secrets
This commit is contained in:
CrazyMax 2024-04-09 08:52:42 +02:00 committed by GitHub
commit d805c784f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -615,10 +615,18 @@ For more information, see [here](https://docs.docker.com/build/attestations/sbom
--secret=[type=TYPE[,KEY=VALUE]
```
Exposes secret to the build. The secret can be used by the build using
[`RUN --mount=type=secret` mount](https://docs.docker.com/reference/dockerfile/#run---mounttypesecret).
Exposes secrets (authentication credentials, tokens) to the build.
A secret can be mounted into the build using a `RUN --mount=type=secret` mount in the
[Dockerfile](https://docs.docker.com/reference/dockerfile/#run---mounttypesecret).
For more information about how to use build secrets, see
[Build secrets](https://docs.docker.com/build/building/secrets/).
If `type` is unset it will be detected. Supported types are:
Supported types are:
- [`file`](#file)
- [`env`](#env)
Buildx attempts to detect the `type` automatically if unset.
#### `file`