Files
no-twitter-bot-stats/Dockerfile
Lucid b67184acfc
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m28s
new file
2025-12-05 22:56:38 -05:00

27 lines
705 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 .
COPY . .
RUN yarn build # Replace with your build command
# --- 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