Files
no-twitter-bot-stats/Dockerfile
Lucid 7981688640
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 5m30s
use known working file from another project
2025-12-05 20:20:43 -05:00

37 lines
549 B
Docker

FROM node:lts-slim AS base
# Create app directory
WORKDIR /app
# Enable Corepack
RUN corepack enable
# Set Yarn to the latest stable version
RUN yarn set version stable
# Files required by yarn install
COPY package.json yarn.lock ./
# Install app dependencies
RUN yarn install --immutable
# Type check app
# RUN yarn typecheck
# Bundle app source
COPY . .
FROM base AS runner
# Bundle app source
COPY . .
# Install only production app dependencies
RUN yarn install --immutable
USER node
# Start the app
EXPOSE 3000
CMD ["yarn", "start"]