Files
Ilango 4ea391204a fix: flowise-598 (#6665)
* update: user and permissions in docker files

* fix: sql database chain node
2026-07-27 17:40:21 +05:30

38 lines
1.1 KiB
Docker

# Node.js version (overridable via build-arg from CI)
ARG NODE_VERSION=24
# Stage 1: Build stage
FROM node:${NODE_VERSION}-alpine AS build
USER root
# Install build dependencies
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev
# Skip downloading Chrome for Puppeteer (saves build time)
ENV PUPPETEER_SKIP_DOWNLOAD=true
# Install latest Flowise globally (specific version can be set: [email protected])
RUN npm install -g flowise
# Stage 2: Runtime stage
FROM node:${NODE_VERSION}-alpine
# Install runtime dependencies
RUN apk add --no-cache chromium git python3 py3-pip make g++ build-base cairo-dev pango-dev curl
# Set the environment variable for Puppeteer to find Chromium
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# Copy Flowise from the build stage
COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=build /usr/local/bin /usr/local/bin
# Give the node user ownership of the installed package (node:*-alpine already has this user)
RUN chown -R node:node /usr/local/lib/node_modules /usr/local/bin
# Switch to non-root user
USER node
ENTRYPOINT ["flowise", "start"]