Skip to content

Commit db11785

Browse files
authored
Merge pull request #2675 from dvdksn/run-mount-secret-env
docs: update run mount secrets examples using env
2 parents ecfe98d + 479177e commit db11785

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/bake-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,8 @@ This lets you [mount the secret][run_mount_secret] in your Dockerfile.
871871
```dockerfile
872872
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
873873
aws cloudfront create-invalidation ...
874-
RUN --mount=type=secret,id=KUBECONFIG \
875-
KUBECONFIG=$(cat /run/secrets/KUBECONFIG) helm upgrade --install
874+
RUN --mount=type=secret,id=KUBECONFIG,env=KUBECONFIG \
875+
helm upgrade --install
876876
```
877877

878878
### `target.shm-size`

docs/reference/buildx_build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,8 @@ Attribute keys:
947947
# syntax=docker/dockerfile:1
948948
FROM node:alpine
949949
RUN --mount=type=bind,target=. \
950-
--mount=type=secret,id=SECRET_TOKEN \
951-
SECRET_TOKEN=$(cat /run/secrets/SECRET_TOKEN) yarn run test
950+
--mount=type=secret,id=SECRET_TOKEN,env=SECRET_TOKEN \
951+
yarn run test
952952
```
953953

954954
```console

0 commit comments

Comments
 (0)