Dockerfile-gcp 378 B

1234567891011121314151617
  1. FROM node:14-alpine AS js-builder
  2. WORKDIR /app
  3. RUN apk --no-cache add make g++ git python3
  4. COPY package.json ./
  5. RUN npm install
  6. COPY . .
  7. FROM js-builder AS dev
  8. CMD ["npm", "run", "staging"]
  9. FROM js-builder AS prod-builder
  10. RUN npm run build
  11. FROM nginx:stable-alpine AS prod
  12. COPY --from=prod-builder /app/dist /usr/share/nginx/html
  13. EXPOSE 80
  14. CMD ["nginx", "-g", "daemon off;"]