| # Stage 1: Build stage | |
| FROM node:20-alpine | |
| USER root | |
| # Skip downloading Chrome for Puppeteer (saves build time) | |
| ENV PUPPETEER_SKIP_DOWNLOAD=true | |
| # Set the environment variable for Puppeteer to find Chromium | |
| ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser | |
| # Install runtime dependencies | |
| RUN apk add --no-cache chromium git python3 py3-pip make g++ build-base cairo-dev pango-dev curl | |
| # Install latest Flowise globally (specific version can be set: flowise@1.0.0) | |
| RUN npm install -g flowise | |
| ENTRYPOINT ["flowise", "start"] | |