Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add cross-reference about build secrets #2378

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/reference/buildx_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +624 to +629
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker for this PR, but perhaps we could introduce a table for this. Also wondering if type should have an explicit auto option (which would be the default if unset); thinking along these lines;

Perhaps also sort these alphabetically (but looks like the paragraphs aren't either 🙈)

type description
auto (default) automatically detect type
env ...
file ....


#### `file`

Expand Down