FROM node:14-alpine AS js-builder WORKDIR /app RUN apk --no-cache add make g++ git python3 COPY package.json ./ RUN npm install COPY . . FROM js-builder AS dev CMD ["npm", "run", "staging"] FROM js-builder AS prod-builder RUN npm run build FROM nginx:stable-alpine AS prod COPY --from=prod-builder /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]