123456789101112131415161718 |
- FROM node:18.12-alpine as build
- WORKDIR /app/kpt-system-web
- ENV NODE_OPTIONS="--max-old-space-size=4096"
- COPY . .
- RUN ls -l && pwd
- RUN npm install -g pnpm
- RUN echo "declare module 'lodash-es';" > types.d.ts
- RUN npm install -g typescript@5.1.6
- RUN pnpm install
- RUN pnpm build
- FROM nginx:alpine as prod
- WORKDIR /app/kpt-system-web
- RUN ls -l && pwd
- COPY --from=build ./dist/ /usr/share/nginx/html/
- COPY --from=build ./nginx.conf /etc/nginx/conf.d/default.conf
- EXPOSE 80
|