From 2570c4107e1d50a00043419646b7c56e0c41d1af Mon Sep 17 00:00:00 2001 From: Francois Best Date: Tue, 9 Apr 2024 10:12:49 +0200 Subject: [PATCH] chore: Workdir & mount point --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42682a9..576fdb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-bookworm AS builder +FROM node:20-slim AS builder WORKDIR /action @@ -14,7 +14,16 @@ RUN pnpm install --frozen-lockfile --prod # --- -FROM node:20-bookworm AS final +FROM node:20-slim AS final + +RUN apt update && apt install -y git + +# Fix for GitHub Actions +# fatal: detected dubious ownership in repository at '/github/workspace' +# To add an exception for this directory, call: +RUN mkdir -p /github/workspace && git config --global --add safe.directory /github/workspace + +WORKDIR /github/workspace COPY --from=builder /action/package.json /action/package.json COPY --from=builder /action/node_modules /action/node_modules