## STEP 1 BUILD ## FROM node:18-alpine AS build RUN mkdir -p /app WORKDIR /app RUN npm cache clean --force COPY package*.json /app RUN npm install COPY . /app RUN npm run build --prod ## STEP 2 DEPLOY ## FROM nginx:1.21.3 AS ngi COPY --from=build /app/dist/* /usr/share/nginx/html COPY /nginx.conf /etc/nginx/conf.d/default.conf # COPY /nginx.conf /etc/nginx/nginx.conf # EXPOSE 9002 CMD ["nginx", "-g", "daemon off;"]