From e18a2f6e580299faab8ab558a74a61086d3931a7 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 3 Apr 2024 09:59:18 +0200 Subject: [PATCH] docs: add cross-reference about build secrets Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/buildx_build.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index 825135c6599..0b896fa273b 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -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`