Files
no-twitter-bot-stats/Dockerfile
Lucid db818cfd2e
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m49s
test ls
2025-12-05 23:34:46 -05:00

29 lines
730 B
Docker

# --- Stage 1: Dependencies ---
FROM node:20-alpine AS dependencies
RUN corepack enable
RUN corepack prepare yarn@stable --activate
COPY package.json yarn.lock /app/
WORKDIR /app
RUN yarn install --immutable
RUN ls -lR /app
RUN ls -lR /
# --- 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 /app/
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 /app/.yarn
CMD ["yarn", "start"] # Replace with your start command