# build stage # node:14.18.0-alpine is lts-alpine as of 10/12/2021 FROM node:14.18.0-alpine as build-stage WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build # production stage # nginx:1.20.1-alpine is nginx-stable as of 10/12/2021 FROM nginx:1.20.1-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]