29 lines
341 B
Docker
29 lines
341 B
Docker
|
FROM node:18-bullseye-slim as builder
|
||
|
|
||
|
WORKDIR /usr/src/app
|
||
|
|
||
|
COPY package*.json ./
|
||
|
|
||
|
RUN npm ci
|
||
|
|
||
|
COPY . .
|
||
|
|
||
|
RUN npm run build
|
||
|
|
||
|
FROM node:18-bullseye-slim
|
||
|
|
||
|
ENV NODE_ENV production
|
||
|
USER node
|
||
|
|
||
|
WORKDIR /usr/src/app
|
||
|
|
||
|
COPY package*.json ./
|
||
|
|
||
|
RUN npm ci --omit=dev
|
||
|
|
||
|
COPY --from=builder /usr/src/app/build ./build
|
||
|
|
||
|
EXPOSE 3000
|
||
|
|
||
|
CMD [ "node", "build" ]
|