Dockerfile 337 B

123456789101112
  1. FROM docker.m.daocloud.io/library/node:20-alpine AS builder
  2. WORKDIR /app
  3. COPY package*.json ./
  4. RUN npm install
  5. COPY . .
  6. RUN npm run build
  7. FROM docker.m.daocloud.io/library/nginx:1.27-alpine
  8. COPY --from=builder /app/dist/ /usr/share/nginx/html/
  9. COPY nginx.conf /etc/nginx/conf.d/default.conf
  10. EXPOSE 80
  11. CMD ["nginx", "-g", "daemon off;"]