Skip to content
Discussion options

You must be logged in to vote

Yes, it does. You can build the app using the node server preset, which is the default. Here is a sample Dockerfile

# Stage 1: Build the application
FROM node:22 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# Stage 2: Create the production image
FROM node:22
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY package*.json ./
RUN npm install --omit=dev
EXPOSE 4000
CMD ["node", "dist/server/server.mjs"]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SidiqovAbbos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants