Files
no-twitter-bot-stats/Dockerfile
Lucid 929294bea0
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 2m49s
move workdir to top level
2025-12-06 00:01:50 -05:00

29 lines
727 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
RUN ls -lR /app
# --- Stage 2: Builder ---
FROM node:20-alpine AS builder
RUN corepack enable
RUN corepack prepare yarn@stable --activate
WORKDIR /app
COPY .yarn ./.yarn
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=dependencies /app/.yarn ./.yarn
CMD ["yarn", "start"] # Replace with your start command