26 lines
378 B
Docker
26 lines
378 B
Docker
# For Build
|
|
FROM node:22-slim as builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json ./
|
|
COPY package-lock.json ./
|
|
COPY tsconfig.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
# For Run
|
|
FROM node:22-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/build ./build
|
|
COPY --from=builder /app/package.json .
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "./build"] |