mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
Merge pull request #2675 from dvdksn/run-mount-secret-env
docs: update run mount secrets examples using env
This commit is contained in:
commit
db117855da
@ -871,8 +871,8 @@ This lets you [mount the secret][run_mount_secret] in your Dockerfile.
|
|||||||
```dockerfile
|
```dockerfile
|
||||||
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
|
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
|
||||||
aws cloudfront create-invalidation ...
|
aws cloudfront create-invalidation ...
|
||||||
RUN --mount=type=secret,id=KUBECONFIG \
|
RUN --mount=type=secret,id=KUBECONFIG,env=KUBECONFIG \
|
||||||
KUBECONFIG=$(cat /run/secrets/KUBECONFIG) helm upgrade --install
|
helm upgrade --install
|
||||||
```
|
```
|
||||||
|
|
||||||
### `target.shm-size`
|
### `target.shm-size`
|
||||||
|
@ -947,8 +947,8 @@ Attribute keys:
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM node:alpine
|
FROM node:alpine
|
||||||
RUN --mount=type=bind,target=. \
|
RUN --mount=type=bind,target=. \
|
||||||
--mount=type=secret,id=SECRET_TOKEN \
|
--mount=type=secret,id=SECRET_TOKEN,env=SECRET_TOKEN \
|
||||||
SECRET_TOKEN=$(cat /run/secrets/SECRET_TOKEN) yarn run test
|
yarn run test
|
||||||
```
|
```
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
Loading…
x
Reference in New Issue
Block a user