Files
no-twitter-bot-stats/Dockerfile
Lucid cc090d6414
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 5m6s
check folder
2025-12-06 00:11:35 -05:00

28 lines
716 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 .yarnrc.yml ./
RUN yarn install
# --- 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 ./
RUN ls -lR /app/node_modules
COPY . /app/
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 /app/build
COPY --from=builder /app/.yarn ./.yarn
CMD ["yarn", "start"] # Replace with your start command