Dockerfile 283 B

1234567891011
  1. FROM node:18-alpine AS build
  2. WORKDIR /app
  3. RUN npm config set registry https://registry.npmmirror.com
  4. COPY . .
  5. RUN npm install --legacy-peer-deps
  6. RUN npx vite build
  7. FROM nginx:1.27-alpine
  8. COPY --from=build /app/dist /usr/share/nginx/html
  9. EXPOSE 80
  10. CMD ["nginx", "-g", "daemon off;"]