You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
345 B
28 lines
345 B
FROM node:24.0.1-alpine as builder |
|
|
|
WORKDIR /app |
|
|
|
COPY package*.json ./ |
|
COPY nest-cli.json ./ |
|
COPY tsconfig.json ./ |
|
|
|
RUN npm install |
|
|
|
COPY src ./src |
|
|
|
RUN npm run build |
|
|
|
|
|
FROM node:24.0.1-alpine |
|
|
|
WORKDIR /app |
|
|
|
COPY package*.json ./ |
|
|
|
RUN npm install --only=production |
|
|
|
COPY --from=builder /app/dist ./dist |
|
|
|
EXPOSE 3000 |
|
|
|
CMD [ "node", "dist/main" ] |