From 479177eaf93288633b0af23a4f3a831c511fdc27 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:51:00 +0200 Subject: [PATCH] docs: update run mount secrets examples using env Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/bake-reference.md | 4 ++-- docs/reference/buildx_build.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/bake-reference.md b/docs/bake-reference.md index 542c50a5..b60d391c 100644 --- a/docs/bake-reference.md +++ b/docs/bake-reference.md @@ -871,8 +871,8 @@ This lets you [mount the secret][run_mount_secret] in your Dockerfile. ```dockerfile RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \ aws cloudfront create-invalidation ... -RUN --mount=type=secret,id=KUBECONFIG \ - KUBECONFIG=$(cat /run/secrets/KUBECONFIG) helm upgrade --install +RUN --mount=type=secret,id=KUBECONFIG,env=KUBECONFIG \ + helm upgrade --install ``` ### `target.shm-size` diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index 1a3cdabb..801aef6f 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -947,8 +947,8 @@ Attribute keys: # syntax=docker/dockerfile:1 FROM node:alpine RUN --mount=type=bind,target=. \ - --mount=type=secret,id=SECRET_TOKEN \ - SECRET_TOKEN=$(cat /run/secrets/SECRET_TOKEN) yarn run test + --mount=type=secret,id=SECRET_TOKEN,env=SECRET_TOKEN \ + yarn run test ``` ```console