# build stage FROM node:16.13.2 as build-stage WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build # production stage FROM nginx:stable-alpine as production-stage RUN rm -rf /etc/nginx/conf.d RUN mkdir -p /etc/nginx/conf.d COPY ./default.conf /etc/nginx/conf.d/ COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]