23 lines
629 B
Docker
23 lines
629 B
Docker
FROM node:22.20.0 AS dependencies
|
|
WORKDIR /no-copy-frontend
|
|
COPY package.json package-lock.json ./
|
|
RUN npm install
|
|
|
|
FROM node:22.20.0 AS builder
|
|
WORKDIR /no-copy-frontend
|
|
|
|
COPY . .
|
|
COPY --from=dependencies /no-copy-frontend/node_modules ./node_modules
|
|
RUN npm run build --force
|
|
|
|
FROM node:22.20.0 AS runner
|
|
WORKDIR /no-copy-frontend
|
|
ENV NODE_ENV=production
|
|
|
|
COPY --from=builder /no-copy-frontend/public ./public
|
|
COPY --from=builder /no-copy-frontend/package.json ./package.json
|
|
COPY --from=builder /no-copy-frontend/.next ./.next
|
|
COPY --from=builder /no-copy-frontend/node_modules ./node_modules
|
|
|
|
EXPOSE 2999
|
|
CMD ["npm", "start"] |