Dockerfile.frontend 412 B

1234567891011121314151617181920212223
  1. FROM node:22-alpine
  2. WORKDIR /opt/maxkb-app/ui
  3. COPY ui/package.json ./
  4. RUN npm config set registry https://registry.npmmirror.com && \
  5. npm install
  6. COPY ui/ ./
  7. ENV NODE_OPTIONS="--max-old-space-size=4096"
  8. RUN npm run build-only
  9. FROM nginx:alpine
  10. COPY --from=0 /opt/maxkb-app/ui/dist /usr/share/nginx/html
  11. COPY ui/nginx.conf /etc/nginx/conf.d/default.conf
  12. EXPOSE 80
  13. CMD ["nginx", "-g", "daemon off;"]