Dockerfile 427 B

12345678910111213141516
  1. FROM node:18-alpine AS builder
  2. WORKDIR /app
  3. RUN npm install -g pnpm@9.3.0
  4. COPY package.json pnpm-lock.yaml ./
  5. RUN pnpm install --frozen-lockfile
  6. COPY . .
  7. ARG APP_TITLE=成都网讯MaaS底座
  8. ARG ENABLE_PLAYGROUND=true
  9. ENV APP_TITLE=$APP_TITLE
  10. ENV ENABLE_PLAYGROUND=$ENABLE_PLAYGROUND
  11. RUN pnpm build
  12. FROM nginx:alpine
  13. COPY --from=builder /app/dist /usr/share/nginx/html
  14. COPY nginx.conf /etc/nginx/conf.d/default.conf
  15. EXPOSE 80