Skip to content

Commit

Permalink
chore: Workdir & mount point
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Apr 9, 2024
1 parent 56d1b4d commit 2570c41
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-bookworm AS builder
FROM node:20-slim AS builder

WORKDIR /action

Expand All @@ -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
Expand Down

0 comments on commit 2570c41

Please sign in to comment.