workdir top level
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m19s
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m19s
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
# --- Stage 1: Dependencies ---
|
||||
FROM node:20-alpine AS dependencies
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare yarn@stable --activate
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock /app/
|
||||
RUN yarn install --immutable
|
||||
|
||||
# --- Stage 2: Builder ---
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare yarn@stable --activate
|
||||
WORKDIR /app
|
||||
COPY --from=dependencies /app/node_modules /app/
|
||||
COPY . /app/
|
||||
RUN yarn build
|
||||
|
||||
# --- Stage 3: Runner ---
|
||||
FROM node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare yarn@stable --activate
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build /app/build
|
||||
COPY --from=dependencies /app/.yarn /app/.yarn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user