From 560550ae62656a48aaa377e3d0d3c37aabb81050 Mon Sep 17 00:00:00 2001 From: Philippe Dionne Date: Tue, 27 Jan 2026 09:14:04 -0500 Subject: [PATCH] Inject env variables at build step --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4754aea..f0d8522 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,8 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -RUN \ +RUN --mount=type=secret,id=.env \ + set -a; . /run/secrets/.env; set +a; \ if [ -f yarn.lock ]; then yarn run build; \ elif [ -f package-lock.json ]; then npm run build; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \