Dockerfile 470 B

123456789101112131415161718
  1. FROM node:18.12-alpine as build
  2. WORKDIR /app/kpt-system-web
  3. ENV NODE_OPTIONS="--max-old-space-size=4096"
  4. COPY . .
  5. RUN ls -l && pwd
  6. RUN npm install -g pnpm
  7. RUN echo "declare module 'lodash-es';" > types.d.ts
  8. RUN npm install -g typescript@5.1.6
  9. RUN pnpm install
  10. RUN pnpm build
  11. FROM nginx:alpine as prod
  12. WORKDIR /app/kpt-system-web
  13. RUN ls -l && pwd
  14. COPY --from=build ./dist/ /usr/share/nginx/html/
  15. COPY --from=build ./nginx.conf /etc/nginx/conf.d/default.conf
  16. EXPOSE 80