Files
no-twitter-bot-stats/Dockerfile
Lucid f8c2b160ad
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m19s
workdir top level
2025-12-05 23:23:17 -05:00

27 lines
701 B
Docker

# --- Stage 1: Dependencies ---
FROM node:20-alpine AS dependencies
WORKDIR /app
RUN corepack enable
RUN corepack prepare yarn@stable --activate
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
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
COPY --from=builder /app/build /app/build
COPY --from=dependencies /app/.yarn /app/.yarn
CMD ["yarn", "start"] # Replace with your start command