Files
no-twitter-bot-stats/Dockerfile
Lucid fb92661b9e
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m19s
copy node_monudes
2025-12-05 23:13:06 -05:00

27 lines
685 B
Docker

# --- Stage 1: Dependencies ---
FROM node:20-alpine AS dependencies
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --immutable
# --- Stage 2: Builder ---
FROM node:20-alpine AS builder
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY --from=dependencies /app/node_modules ./
COPY . .
RUN yarn build
# --- Stage 3: Runner ---
FROM node:20-alpine AS runner
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY --from=builder /app/build ./build
COPY --from=dependencies /app/.yarn ./.yarn
CMD ["yarn", "start"] # Replace with your start command