Dockerfile 689 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 && mkdir -p /root/.local/share/pnpm/store/v3/files && chown -R $(whoami) /root/.local/share/pnpm/store/v3/
  6. RUN npm install -g pnpm && npm install -g typescript@5.1.6
  7. RUN echo "declare module 'lodash-es';" > types.d.ts
  8. RUN pnpm config set registry https://registry.npmmirror.com
  9. RUN pnpm update vue-demi@latest
  10. RUN pnpm install --fetch-timeout 60000
  11. RUN pnpm build
  12. FROM nginx:alpine as prod
  13. WORKDIR /app/kpt-system-web
  14. RUN ls -l && pwd
  15. COPY --from=build ./dist/ /usr/share/nginx/html/
  16. COPY --from=build ./nginx.conf /etc/nginx/conf.d/default.conf
  17. EXPOSE 80