Dockerfile 330 B

1234567891011121314
  1. FROM node:latest as build
  2. WORKDIR /app/kpt-system-web
  3. COPY . .
  4. RUN npm install -g pnpm
  5. RUN pnpm install
  6. RUN pnpm build
  7. RUN ls -l && pwd
  8. FROM nginx:alpine as prod
  9. WORKDIR /app/kpt-system-web
  10. RUN ls -l && pwd
  11. COPY --from=build ./dist/ /usr/share/nginx/html/
  12. COPY --from=build ./nginx.conf /etc/nginx/conf.d/default.conf
  13. EXPOSE 80