Dockerfile 381 B

1234567891011121314151617
  1. FROM node:20-alpine AS build
  2. WORKDIR /app
  3. COPY package.json ./
  4. COPY package-lock.json ./
  5. RUN npm config set registry https://registry.npmmirror.com \
  6. && npm ci --no-audit --no-fund
  7. COPY . .
  8. RUN npm run build
  9. FROM nginx:1.27-alpine
  10. COPY --from=build /app/dist /usr/share/nginx/html
  11. COPY nginx.conf /etc/nginx/conf.d/default.conf
  12. EXPOSE 80
  13. CMD ["nginx", "-g", "daemon off;"]