Files
no-twitter-bot-stats/Dockerfile
Lucid b534b3f38f
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 4m20s
test
2025-12-06 00:17:09 -05:00

27 lines
687 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 ./
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