Dockerfile 614 B

1234567891011121314151617181920
  1. FROM node:18-alpine AS builder
  2. RUN apk add --no-cache git
  3. WORKDIR /app
  4. RUN npm install -g pnpm@9.3.0
  5. COPY package.json pnpm-lock.yaml ./
  6. RUN pnpm install --frozen-lockfile
  7. COPY . .
  8. ARG APP_TITLE=成都网讯MaaS底座
  9. ARG ENABLE_PLAYGROUND=true
  10. ENV APP_TITLE=$APP_TITLE
  11. ENV ENABLE_PLAYGROUND=$ENABLE_PLAYGROUND
  12. RUN pnpm build
  13. FROM nginx:alpine
  14. RUN apk add --no-cache gettext
  15. COPY --from=builder /app/dist /usr/share/nginx/html
  16. COPY nginx.conf.template /etc/nginx/conf.d/default.conf.template
  17. COPY docker-entrypoint.sh /docker-entrypoint.d/99-envsubst.sh
  18. RUN chmod +x /docker-entrypoint.d/99-envsubst.sh
  19. EXPOSE 80